Enhanced C#
Language of your choice: library documentation
|
Adapter: a random-access range for a slice of an INegListSource<T>. More...
Adapter: a random-access range for a slice of an INegListSource<T>.
T | Item type in the list |
Although this slices a neg-list, the slice itself is an ordinary zero-indexed IListSource<T>. It implements INegListSource<T> for completeness, but its Min
is 0.
Public fields | |
INegListSource< T > | _list |
int | _start |
int | _count |
Properties | |
int | Count [get] |
bool | IsEmpty [get] |
T | First [get] |
T | Last [get] |
T | this[int index] [get] |
T? | this[int index, T defaultValue] [get] |
int INegListSource< T >. | Min [get] |
int INegListSource< T >. | Max [get] |
Properties inherited from Loyc.Collections.IIsEmpty | |
bool | IsEmpty [get] |
Properties inherited from Loyc.Collections.INegListSource< T > | |
int | Min [get] |
Returns the minimum valid index in the collection. More... | |
int | Max [get] |
Returns the maximum valid index in the collection. More... | |
Public Member Functions | |
NegListSlice (INegListSource< T > list) | |
NegListSlice (INegListSource< T > list, int start, int count=int.MaxValue) | |
Initializes a slice. More... | |
T | PopFirst (out bool empty) |
T | PopLast (out bool empty) |
IFRange< T > ICloneable< IFRange< T > >. | Clone () |
IBRange< T > ICloneable< IBRange< T > >. | Clone () |
IRange< T > ICloneable< IRange< T > >. | Clone () |
NegListSlice< T > | Clone () |
IEnumerator< T > IEnumerable< T >. | GetEnumerator () |
System.Collections.IEnumerator System.Collections.IEnumerable. | GetEnumerator () |
RangeEnumerator< NegListSlice< T >, T > | GetEnumerator () |
T | TryGet (int index, out bool fail) |
IRange< T > IListSource< T >. | Slice (int start, int count) |
IRange< T > INegListSource< T >. | Slice (int start, int count) |
NegListSlice< T > | Slice (int start, int count=int.MaxValue) |
Public Member Functions inherited from Loyc.Collections.INegListSource< T > | |
IRange< T > | Slice (int start, int count=int.MaxValue) |
Returns a sub-range of this list. More... | |
|
inline |
Initializes a slice.
ArgumentException | The start index was below zero. |
The (start, count) range is allowed to be invalid, as long as 'start' is Min
or above and 'count' is zero or above.
list.Count - start
. References Loyc.Collections.INegListSource< out out T >.Min.