Interface IIndexed<T>
A sequenced collection, where indices of items in the order are maintained
Inherited Members
Namespace: Lucene.Net.Support.C5
Assembly: Lucene.Net.dll
Syntax
public interface IIndexed<T> : ISequenced<T>, ICollection<T>, IExtensible<T>, ICollection<T>, IDirectedCollectionValue<T>, ICollectionValue<T>, IShowable, IFormattable, IDirectedEnumerable<T>, IReadOnlyList<T>, IReadOnlyCollection<T>, IEnumerable<T>, IEnumerable
Type Parameters
Name | Description |
---|---|
T |
Properties
| Improve this Doc View SourceIndexingSpeed
Declaration
Speed IndexingSpeed { get; }
Property Value
Type | Description |
---|---|
Speed |
Item[Int32, Int32]
Declaration
IDirectedCollectionValue<T> this[int start, int count] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | start | The low index of the interval (inclusive). |
System.Int32 | count | The size of the range. |
Property Value
Type | Description |
---|---|
IDirectedCollectionValue<T> | The directed collection of items in a specific index interval. |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException |
Methods
| Improve this Doc View SourceFindIndex(Func<T, Boolean>)
Check if there exists an item that satisfies a specific predicate in this collection and return the index of the first one.
Declaration
int FindIndex(Func<T, bool> predicate)
Parameters
Type | Name | Description |
---|---|---|
System.Func<T, System.Boolean> | predicate | A delegate (Func`2 with ) defining the predicate
|
Returns
Type | Description |
---|---|
System.Int32 | the index, if found, a negative value else |
FindLastIndex(Func<T, Boolean>)
Check if there exists an item that satisfies a specific predicate in this collection and return the index of the last one.
Declaration
int FindLastIndex(Func<T, bool> predicate)
Parameters
Type | Name | Description |
---|---|---|
System.Func<T, System.Boolean> | predicate | A delegate (Func`2 with ) defining the predicate
|
Returns
Type | Description |
---|---|
System.Int32 | the index, if found, a negative value else |
IndexOf(T)
Searches for an item in the list going forwards from the start.
Declaration
int IndexOf(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item | Item to search for. |
Returns
Type | Description |
---|---|
System.Int32 | Index of item from start. A negative number if item not found, namely the one's complement of the index at which the Add operation would put the item. |
LastIndexOf(T)
Searches for an item in the list going backwards from the end.
Declaration
int LastIndexOf(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item | Item to search for. |
Returns
Type | Description |
---|---|
System.Int32 | Index of of item from the end. A negative number if item not found, namely the two-complement of the index at which the Add operation would put the item. |
RemoveAt(Int32)
Remove the item at a specific position of the list.
Declaration
T RemoveAt(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index of the item to remove. |
Returns
Type | Description |
---|---|
T | The removed item. |
Exceptions
Type | Condition |
---|---|
System.IndexOutOfRangeException | if is negative or
|
RemoveInterval(Int32, Int32)
Remove all items in an index interval.
Declaration
void RemoveInterval(int start, int count)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | start | The index of the first item to remove. |
System.Int32 | count | The number of items to remove. |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | if start or count is negative or start+count > the size of the collection. |