Show / Hide Table of Contents

    Interface IList<T>

    This is an indexed collection, where the item order is chosen by the user at insertion time.

    NBNBNB: we need a description of the view functionality here!

    Inherited Members
    IIndexed<T>.IndexingSpeed
    IIndexed<T>.Item[Int32, Int32]
    IIndexed<T>.LastIndexOf(T)
    IIndexed<T>.FindIndex(Func<T, Boolean>)
    IIndexed<T>.FindLastIndex(Func<T, Boolean>)
    IIndexed<T>.RemoveInterval(Int32, Int32)
    ISequenced<T>.GetSequencedHashCode()
    ISequenced<T>.SequencedEquals(ISequenced<T>)
    ICollection<T>.ContainsSpeed
    ICollection<T>.GetUnsequencedHashCode()
    ICollection<T>.UnsequencedEquals(ICollection<T>)
    ICollection<T>.ContainsCount(T)
    ICollection<T>.UniqueItems()
    ICollection<T>.ItemMultiplicities()
    ICollection<T>.ContainsAll(System.Collections.Generic.IEnumerable<T>)
    ICollection<T>.Find(T)
    ICollection<T>.FindOrAdd(T)
    ICollection<T>.Update(T)
    ICollection<T>.Update(T, T)
    ICollection<T>.UpdateOrAdd(T)
    ICollection<T>.UpdateOrAdd(T, T)
    ICollection<T>.Remove(T, T)
    ICollection<T>.RemoveAllCopies(T)
    ICollection<T>.RemoveAll(System.Collections.Generic.IEnumerable<T>)
    ICollection<T>.RetainAll(System.Collections.Generic.IEnumerable<T>)
    IExtensible<T>.AllowsDuplicates
    IExtensible<T>.EqualityComparer
    IExtensible<T>.DuplicatesByCounting
    IExtensible<T>.AddAll(System.Collections.Generic.IEnumerable<T>)
    IExtensible<T>.Check()
    IDirectedCollectionValue<T>.Backwards()
    IDirectedCollectionValue<T>.FindLast(Func<T, Boolean>, T)
    ICollectionValue<T>.ListenableEvents
    ICollectionValue<T>.ActiveEvents
    ICollectionValue<T>.CollectionChanged
    ICollectionValue<T>.CollectionCleared
    ICollectionValue<T>.ItemsAdded
    ICollectionValue<T>.ItemInserted
    ICollectionValue<T>.ItemsRemoved
    ICollectionValue<T>.ItemRemovedAt
    ICollectionValue<T>.IsEmpty
    ICollectionValue<T>.CountSpeed
    ICollectionValue<T>.ToArray()
    ICollectionValue<T>.Apply(Action<T>)
    ICollectionValue<T>.Exists(Func<T, Boolean>)
    ICollectionValue<T>.Find(Func<T, Boolean>, T)
    ICollectionValue<T>.All(Func<T, Boolean>)
    ICollectionValue<T>.Choose()
    ICollectionValue<T>.Filter(Func<T, Boolean>)
    IShowable.Show(System.Text.StringBuilder, Int32, IFormatProvider)
    IDirectedEnumerable<T>.Direction
    Namespace: Lucene.Net.Support.C5
    Assembly: Lucene.Net.dll
    Syntax
    public interface IList<T> : IIndexed<T>, ISequenced<T>, ICollection<T>, IExtensible<T>, System.Collections.Generic.ICollection<T>, IDirectedCollectionValue<T>, ICollectionValue<T>, IShowable, IFormattable, IDirectedEnumerable<T>, IReadOnlyList<T>, IReadOnlyCollection<T>, System.Collections.Generic.IEnumerable<T>, System.Collections.IEnumerable, IDisposable, System.Collections.Generic.IList<T>, System.Collections.IList
    Type Parameters
    Name Description
    T

    Properties

    | Improve this Doc View Source

    Count

    Declaration
    int Count { get; }
    Property Value
    Type Description
    System.Int32
    | Improve this Doc View Source

    FIFO

    Since

    Add(T item)
    always add at the end of the list, this describes if list has FIFO or LIFO semantics.

    Declaration
    bool FIFO { get; set; }
    Property Value
    Type Description
    System.Boolean

    True if the

    Remove()
    operation removes from the start of the list, false if it removes from the end.

    | Improve this Doc View Source

    First

    Declaration
    T First { get; }
    Property Value
    Type Description
    T

    The first item in this list.

    Exceptions
    Type Condition
    NoSuchItemException

    if this list is empty.

    | Improve this Doc View Source

    IsReadOnly

    Declaration
    bool IsReadOnly { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IsValid

    Declaration
    bool IsValid { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Item[Int32]

    On this list, this indexer is read/write.

    Declaration
    T this[int index] { get; set; }
    Parameters
    Type Name Description
    System.Int32 index

    The index of the item to fetch or store.

    Property Value
    Type Description
    T

    The index'th item of this list.

    | Improve this Doc View Source

    Last

    Declaration
    T Last { get; }
    Property Value
    Type Description
    T

    The last item in this list.

    Exceptions
    Type Condition
    NoSuchItemException

    if this list is empty.

    | Improve this Doc View Source

    Offset

    Declaration
    int Offset { get; }
    Property Value
    Type Description
    System.Int32

    Offset for this list view or 0 for an underlying list.

    | Improve this Doc View Source

    Underlying

    Null if this list is not a view.

    Declaration
    IList<T> Underlying { get; }
    Property Value
    Type Description
    IList<T>

    Underlying list for view.

    Methods

    | Improve this Doc View Source

    Add(T)

    Declaration
    bool Add(T item)
    Parameters
    Type Name Description
    T item
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Clear()

    Declaration
    void Clear()
    | Improve this Doc View Source

    Contains(T)

    Declaration
    bool Contains(T item)
    Parameters
    Type Name Description
    T item
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    CopyTo(T[], Int32)

    Declaration
    void CopyTo(T[] array, int index)
    Parameters
    Type Name Description
    T[] array
    System.Int32 index
    | Improve this Doc View Source

    FindAll(Func<T, Boolean>)

    Create a new list consisting of the items of this list satisfying a certain predicate.

    Declaration
    IList<T> FindAll(Func<T, bool> filter)
    Parameters
    Type Name Description
    Func<T, System.Boolean> filter

    The filter delegate defining the predicate.

    Returns
    Type Description
    IList<T>

    The new list.

    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    Insert(IList<T>, T)

    Insert an item at the end of a compatible view, used as a pointer.

    The

    pointer
    must be a view on the same list as

    this
    and the endpoint of
    pointer
    must be

    a valid insertion point of

    this

    Declaration
    void Insert(IList<T> pointer, T item)
    Parameters
    Type Name Description
    IList<T> pointer
    T item
    Exceptions
    Type Condition
    IncompatibleViewException

    If

    pointer
    is not a view on the same list as
    this

    DuplicateNotAllowedException

    if the list has

    AllowsDuplicates==false
    and the item is

    already in the list.

    | Improve this Doc View Source

    InsertAll(Int32, System.Collections.Generic.IEnumerable<T>)

    Insert into this list all items from an enumerable collection starting at a particular index.

    Declaration
    void InsertAll(int index, System.Collections.Generic.IEnumerable<T> items)
    Parameters
    Type Name Description
    System.Int32 index

    Index to start inserting at

    System.Collections.Generic.IEnumerable<T> items

    Items to insert

    Exceptions
    Type Condition
    DuplicateNotAllowedException

    if the list has

    AllowsDuplicates==false
    and one of the items to insert is

    already in the list.

    | Improve this Doc View Source

    InsertFirst(T)

    Insert an item at the front of this list. DuplicateNotAllowedException if the list has

    AllowsDuplicates==false
    and the item is

    already in the list.

    Declaration
    void InsertFirst(T item)
    Parameters
    Type Name Description
    T item

    The item to insert.

    | Improve this Doc View Source

    InsertLast(T)

    Insert an item at the back of this list. DuplicateNotAllowedException if the list has

    AllowsDuplicates==false
    and the item is

    already in the list.

    Declaration
    void InsertLast(T item)
    Parameters
    Type Name Description
    T item

    The item to insert.

    | Improve this Doc View Source

    IsSorted()

    Check if this list is sorted according to the default sorting order for the item type T, as defined by the C5.Comparer`1 class

    Declaration
    bool IsSorted()
    Returns
    Type Description
    System.Boolean

    True if the list is sorted, else false.

    Exceptions
    Type Condition
    NotComparableException

    if T is not comparable

    | Improve this Doc View Source

    IsSorted(System.Collections.Generic.IComparer<T>)

    Check if this list is sorted according to a specific sorting order.

    Declaration
    bool IsSorted(System.Collections.Generic.IComparer<T> comparer)
    Parameters
    Type Name Description
    System.Collections.Generic.IComparer<T> comparer

    The comparer defining the sorting order.

    Returns
    Type Description
    System.Boolean

    True if the list is sorted, else false.

    | Improve this Doc View Source

    LastViewOf(T)

    Create a list view on this list containing the last occurrence of a particular item. NoSuchItemException if the item is not in this list.

    Declaration
    IList<T> LastViewOf(T item)
    Parameters
    Type Name Description
    T item

    The item to find.

    Returns
    Type Description
    IList<T>

    The new list view.

    | Improve this Doc View Source

    Map<V>(Func<T, V>)

    Create a new list consisting of the results of mapping all items of this list. The new list will use the default equalityComparer for the item type V.

    Declaration
    IList<V> Map<V>(Func<T, V> mapper)
    Parameters
    Type Name Description
    Func<T, V> mapper

    The delegate defining the map.

    Returns
    Type Description
    IList<V>

    The new list.

    Type Parameters
    Name Description
    V

    The type of items of the new list

    | Improve this Doc View Source

    Map<V>(Func<T, V>, System.Collections.Generic.IEqualityComparer<V>)

    Create a new list consisting of the results of mapping all items of this list. The new list will use a specified equalityComparer for the item type.

    Declaration
    IList<V> Map<V>(Func<T, V> mapper, System.Collections.Generic.IEqualityComparer<V> equalityComparer)
    Parameters
    Type Name Description
    Func<T, V> mapper

    The delegate defining the map.

    System.Collections.Generic.IEqualityComparer<V> equalityComparer

    The equalityComparer to use for the new list

    Returns
    Type Description
    IList<V>

    The new list.

    Type Parameters
    Name Description
    V

    The type of items of the new list

    | Improve this Doc View Source

    Remove()

    Remove one item from the list: from the front if

    FIFO
    is true, else from the back. NoSuchItemException if this list is empty.

    Declaration
    T Remove()
    Returns
    Type Description
    T

    The removed item.

    | Improve this Doc View Source

    Remove(T)

    Declaration
    bool Remove(T item)
    Parameters
    Type Name Description
    T item
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    RemoveFirst()

    Remove one item from the front of the list. NoSuchItemException if this list is empty.

    Declaration
    T RemoveFirst()
    Returns
    Type Description
    T

    The removed item.

    | Improve this Doc View Source

    RemoveLast()

    Remove one item from the back of the list. NoSuchItemException if this list is empty.

    Declaration
    T RemoveLast()
    Returns
    Type Description
    T

    The removed item.

    | Improve this Doc View Source

    Reverse()

    Reverse the list so the items are in the opposite sequence order.

    Declaration
    void Reverse()
    | Improve this Doc View Source

    Shuffle()

    Randomly shuffle the items of this list.

    Declaration
    void Shuffle()
    | Improve this Doc View Source

    Shuffle(Random)

    Shuffle the items of this list according to a specific random source.

    Declaration
    void Shuffle(Random rnd)
    Parameters
    Type Name Description
    Random rnd

    The random source.

    | Improve this Doc View Source

    Slide(Int32)

    Slide this list view along the underlying list.

    Declaration
    IList<T> Slide(int offset)
    Parameters
    Type Name Description
    System.Int32 offset

    The signed amount to slide: positive to slide towards the end.

    Returns
    Type Description
    IList<T>
    Exceptions
    Type Condition
    NotAViewException

    if this list is not a view.

    | Improve this Doc View Source

    Slide(Int32, Int32)

    Slide this list view along the underlying list, changing its size.

    Declaration
    IList<T> Slide(int offset, int size)
    Parameters
    Type Name Description
    System.Int32 offset

    The signed amount to slide: positive to slide towards the end.

    System.Int32 size

    The new size of the view.

    Returns
    Type Description
    IList<T>
    Exceptions
    Type Condition
    NotAViewException

    if this list is not a view.

    | Improve this Doc View Source

    Sort()

    Sort the items of the list according to the default sorting order for the item type T, as defined by the C5.Comparer`1 class

    Declaration
    void Sort()
    Exceptions
    Type Condition
    NotComparableException

    if T is not comparable

    | Improve this Doc View Source

    Sort(System.Collections.Generic.IComparer<T>)

    Sort the items of the list according to a specified sorting order.

    The sorting does not perform duplicate elimination or identify items according to the comparer or itemequalityComparer. I.e. the list as an unsequenced collection with binary equality, will not change.

    Declaration
    void Sort(System.Collections.Generic.IComparer<T> comparer)
    Parameters
    Type Name Description
    System.Collections.Generic.IComparer<T> comparer

    The comparer defining the sorting order.

    | Improve this Doc View Source

    Span(IList<T>)

    Returns null if

    otherView
    is strictly to the left of this view

    Declaration
    IList<T> Span(IList<T> otherView)
    Parameters
    Type Name Description
    IList<T> otherView
    Returns
    Type Description
    IList<T>
    Exceptions
    Type Condition
    IncompatibleViewException

    If otherView does not have the same underlying list as this

    | Improve this Doc View Source

    TrySlide(Int32)

    Declaration
    bool TrySlide(int offset)
    Parameters
    Type Name Description
    System.Int32 offset
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    TrySlide(Int32, Int32)

    Declaration
    bool TrySlide(int offset, int size)
    Parameters
    Type Name Description
    System.Int32 offset
    System.Int32 size
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    View(Int32, Int32)

    Create a list view on this list. if the view would not fit into this list.

    Declaration
    IList<T> View(int start, int count)
    Parameters
    Type Name Description
    System.Int32 start

    The index in this list of the start of the view.

    System.Int32 count

    The size of the view.

    Returns
    Type Description
    IList<T>

    The new list view.

    | Improve this Doc View Source

    ViewOf(T)

    Create a list view on this list containing the (first) occurrence of a particular item. NoSuchItemException if the item is not in this list.

    Declaration
    IList<T> ViewOf(T item)
    Parameters
    Type Name Description
    T item

    The item to find.

    Returns
    Type Description
    IList<T>

    The new list view.

    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)