Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class CharArrayDictionary<TValue>.ValueCollection

    Class that represents the values in the CharArrayDictionary<TValue>.

    Inheritance
    object
    CharArrayDictionary<TValue>.ValueCollection
    Implements
    ICollection<TValue>
    ICollection
    IReadOnlyCollection<TValue>
    IEnumerable<TValue>
    IEnumerable
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Lucene.Net.Analysis.Util
    Assembly: Lucene.Net.Analysis.Common.dll
    Syntax
    public sealed class CharArrayDictionary<TValue>.ValueCollection : ICollection<TValue>, ICollection, IReadOnlyCollection<TValue>, IEnumerable<TValue>, IEnumerable

    Constructors

    ValueCollection(CharArrayDictionary<TValue>)

    Initializes a new instance of CharArrayDictionary<TValue>.ValueCollection for the provided CharArrayDictionary<TValue>.

    Declaration
    public ValueCollection(CharArrayDictionary<TValue> dictionary)
    Parameters
    Type Name Description
    CharArrayDictionary<TValue> dictionary

    The dictionary to read the values from.

    Exceptions
    Type Condition
    ArgumentNullException

    dictionary is null.

    Properties

    Count

    Gets the number of elements contained in the CharArrayDictionary<TValue>.ValueCollection.

    Declaration
    public int Count { get; }
    Property Value
    Type Description
    int
    Remarks

    Retrieving the value of this property is an O(1) operation.

    Methods

    Contains(TValue)

    Determines whether the set contains a specific element.

    Declaration
    public bool Contains(TValue item)
    Parameters
    Type Name Description
    TValue item

    The element to locate in the set.

    Returns
    Type Description
    bool

    true if the set contains item; otherwise, false.

    CopyTo(TValue[], int)

    Copies the CharArrayDictionary<TValue>.ValueCollection elements to an existing one-dimensional array, starting at the specified array index.

    Declaration
    public void CopyTo(TValue[] array, int arrayIndex)
    Parameters
    Type Name Description
    TValue[] array

    The one-dimensional array that is the destination of the elements copied from the CharArrayDictionary<TValue>.ValueCollection. The array must have zero-based indexing.

    int arrayIndex

    The zero-based index in array at which copying begins.

    Remarks

    The elements are copied to the array in the same order in which the enumerator iterates through the CharArrayDictionary<TValue>.ValueCollection.

    This method is an O(n) operation, where n is Count.
    Exceptions
    Type Condition
    ArgumentNullException

    array is null.

    ArgumentOutOfRangeException

    arrayIndex is less than 0.

    ArgumentException

    The number of elements in the source CharArrayDictionary<TValue>.ValueCollection is greater than the available space from arrayIndex to the end of the destination array.

    GetEnumerator()

    Returns an enumerator that iterates through the CharArrayDictionary<TValue>.ValueCollection.

    Declaration
    public CharArrayDictionary<TValue>.ValueCollection.Enumerator GetEnumerator()
    Returns
    Type Description
    CharArrayDictionary<TValue>.ValueCollection.Enumerator

    An enumerator that iterates through the CharArrayDictionary<TValue>.ValueCollection.

    Remarks

    An enumerator remains valid as long as the collection remains unchanged. If changes are made to the collection, such as adding, modifying, or deleting elements, the enumerator is irrecoverably invalidated and the next call to MoveNext() or Reset() throws an InvalidOperationException.

    This method is an O(log n) operation.

    ToString()

    Returns a string that represents the current collection.

    The presentation has a specific format. It is enclosed by square brackets ("[]"). Elements are separated by ', ' (comma and space). null values are represented as the string "null".
    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A string that represents the current collection.

    Overrides
    object.ToString()

    Implements

    ICollection<T>
    ICollection
    IReadOnlyCollection<T>
    IEnumerable<T>
    IEnumerable

    Extension Methods

    EnumerableExtensions.ToCharArraySet<T>(IEnumerable<T>, LuceneVersion)
    EnumerableExtensions.ToCharArraySet<T>(IEnumerable<T>, LuceneVersion, bool)
    Back to top Copyright © 2024 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.