Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class WeightedSpanTermExtractor.PositionCheckingMap<K>

    This class makes sure that if both position sensitive and insensitive versions of the same term are added, the position insensitive one wins.

    Inheritance
    object
    WeightedSpanTermExtractor.PositionCheckingMap<K>
    Implements
    IDictionary<K, WeightedSpanTerm>
    ICollection<KeyValuePair<K, WeightedSpanTerm>>
    IEnumerable<KeyValuePair<K, WeightedSpanTerm>>
    IEnumerable
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Lucene.Net.Search.Highlight
    Assembly: Lucene.Net.Highlighter.dll
    Syntax
    protected class WeightedSpanTermExtractor.PositionCheckingMap<K> : IDictionary<K, WeightedSpanTerm>, ICollection<KeyValuePair<K, WeightedSpanTerm>>, IEnumerable<KeyValuePair<K, WeightedSpanTerm>>, IEnumerable
    Type Parameters
    Name Description
    K

    Properties

    Count

    Gets the number of elements contained in the ICollection<T>.

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

    The number of elements contained in the ICollection<T>.

    IsReadOnly

    Gets a value indicating whether the ICollection<T> is read-only.

    Declaration
    public bool IsReadOnly { get; }
    Property Value
    Type Description
    bool

    true if the ICollection<T> is read-only; otherwise, false.

    this[K]

    Gets or sets the element with the specified key.

    Declaration
    public WeightedSpanTerm this[K key] { get; set; }
    Parameters
    Type Name Description
    K key

    The key of the element to get or set.

    Property Value
    Type Description
    WeightedSpanTerm

    The element with the specified key.

    Exceptions
    Type Condition
    ArgumentNullException

    key is null.

    KeyNotFoundException

    The property is retrieved and key is not found.

    NotSupportedException

    The property is set and the IDictionary<TKey, TValue> is read-only.

    Keys

    Gets an ICollection<T> containing the keys of the IDictionary<TKey, TValue>.

    Declaration
    public ICollection<K> Keys { get; }
    Property Value
    Type Description
    ICollection<K>

    An ICollection<T> containing the keys of the object that implements IDictionary<TKey, TValue>.

    Values

    Gets an ICollection<T> containing the values in the IDictionary<TKey, TValue>.

    Declaration
    public ICollection<WeightedSpanTerm> Values { get; }
    Property Value
    Type Description
    ICollection<WeightedSpanTerm>

    An ICollection<T> containing the values in the object that implements IDictionary<TKey, TValue>.

    Methods

    Add(KeyValuePair<K, WeightedSpanTerm>)

    Adds an item to the ICollection<T>.

    Declaration
    public void Add(KeyValuePair<K, WeightedSpanTerm> item)
    Parameters
    Type Name Description
    KeyValuePair<K, WeightedSpanTerm> item

    The object to add to the ICollection<T>.

    Exceptions
    Type Condition
    NotSupportedException

    The ICollection<T> is read-only.

    Add(K, WeightedSpanTerm)

    Adds an element with the provided key and value to the IDictionary<TKey, TValue>.

    Declaration
    public void Add(K key, WeightedSpanTerm value)
    Parameters
    Type Name Description
    K key

    The object to use as the key of the element to add.

    WeightedSpanTerm value

    The object to use as the value of the element to add.

    Exceptions
    Type Condition
    ArgumentNullException

    key is null.

    ArgumentException

    An element with the same key already exists in the IDictionary<TKey, TValue>.

    NotSupportedException

    The IDictionary<TKey, TValue> is read-only.

    Clear()

    Removes all items from the ICollection<T>.

    Declaration
    public void Clear()
    Exceptions
    Type Condition
    NotSupportedException

    The ICollection<T> is read-only.

    Contains(KeyValuePair<K, WeightedSpanTerm>)

    Determines whether the ICollection<T> contains a specific value.

    Declaration
    public bool Contains(KeyValuePair<K, WeightedSpanTerm> item)
    Parameters
    Type Name Description
    KeyValuePair<K, WeightedSpanTerm> item

    The object to locate in the ICollection<T>.

    Returns
    Type Description
    bool

    true if item is found in the ICollection<T>; otherwise, false.

    ContainsKey(K)

    Determines whether the IDictionary<TKey, TValue> contains an element with the specified key.

    Declaration
    public bool ContainsKey(K key)
    Parameters
    Type Name Description
    K key

    The key to locate in the IDictionary<TKey, TValue>.

    Returns
    Type Description
    bool

    true if the IDictionary<TKey, TValue> contains an element with the key; otherwise, false.

    Exceptions
    Type Condition
    ArgumentNullException

    key is null.

    CopyTo(KeyValuePair<K, WeightedSpanTerm>[], int)

    Copies the elements of the ICollection<T> to an Array, starting at a particular Array index.

    Declaration
    public void CopyTo(KeyValuePair<K, WeightedSpanTerm>[] array, int arrayIndex)
    Parameters
    Type Name Description
    KeyValuePair<K, WeightedSpanTerm>[] array

    The one-dimensional Array that is the destination of the elements copied from ICollection<T>. The Array must have zero-based indexing.

    int arrayIndex

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

    Exceptions
    Type Condition
    ArgumentNullException

    array is null.

    ArgumentOutOfRangeException

    arrayIndex is less than 0.

    ArgumentException

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

    GetEnumerator()

    Returns an enumerator that iterates through the collection.

    Declaration
    public IEnumerator<KeyValuePair<K, WeightedSpanTerm>> GetEnumerator()
    Returns
    Type Description
    IEnumerator<KeyValuePair<K, WeightedSpanTerm>>

    An enumerator that can be used to iterate through the collection.

    Remove(KeyValuePair<K, WeightedSpanTerm>)

    Removes the first occurrence of a specific object from the ICollection<T>.

    Declaration
    public bool Remove(KeyValuePair<K, WeightedSpanTerm> item)
    Parameters
    Type Name Description
    KeyValuePair<K, WeightedSpanTerm> item

    The object to remove from the ICollection<T>.

    Returns
    Type Description
    bool

    true if item was successfully removed from the ICollection<T>; otherwise, false. This method also returns false if item is not found in the original ICollection<T>.

    Exceptions
    Type Condition
    NotSupportedException

    The ICollection<T> is read-only.

    Remove(K)

    Removes the element with the specified key from the IDictionary<TKey, TValue>.

    Declaration
    public bool Remove(K key)
    Parameters
    Type Name Description
    K key

    The key of the element to remove.

    Returns
    Type Description
    bool

    true if the element is successfully removed; otherwise, false. This method also returns false if key was not found in the original IDictionary<TKey, TValue>.

    Exceptions
    Type Condition
    ArgumentNullException

    key is null.

    NotSupportedException

    The IDictionary<TKey, TValue> is read-only.

    TryGetValue(K, out WeightedSpanTerm)

    Gets the value associated with the specified key.

    Declaration
    public bool TryGetValue(K key, out WeightedSpanTerm value)
    Parameters
    Type Name Description
    K key

    The key whose value to get.

    WeightedSpanTerm value

    When this method returns, the value associated with the specified key, if the key is found; otherwise, the default value for the type of the value parameter. This parameter is passed uninitialized.

    Returns
    Type Description
    bool

    true if the object that implements IDictionary<TKey, TValue> contains an element with the specified key; otherwise, false.

    Exceptions
    Type Condition
    ArgumentNullException

    key is null.

    Implements

    IDictionary<TKey, TValue>
    ICollection<T>
    IEnumerable<T>
    IEnumerable
    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.