Implement SubList(), SubMap(), Head() and Tail() functionality in List<T>, SortedSet<t>, and SortedDictionary<TKey, TValue> #9
Labels
design
is:enhancement
New feature or request
is:feature
pri:low
up for grabs
This issue is open to be worked on by anyone
Java has the ability to get a view of sorted collections without allocating additional memory. Unlike LINQ, these are not cut down interfaces that are read-only, but can be edited (which modifies the original collection). .NET has such functionality, but only on
SortedSet<T>
with theGetViewBetween(T, T)
method.So far, the
GetViewBetween(T, T)
method ofSortedSet<T>
has been duplicated along with a second overload that accepts boolean parameters indicating whether the upper and lower bounds should be inclusive. This allows us to match the behavior of Java by making the upper bound exclusive, but still keep compatibility with .NET where both bounds are inclusive.However, we are missing several members from Java that can be useful, some of which are used by Lucene.NET. In particular,
SubList
is used frequently, but currently the implementation has no tests and is only partially implemented.Proposed API
The text was updated successfully, but these errors were encountered: