Show / Hide Table of Contents

    Class KeyValuePairEqualityComparer<K, V>

    Default equalityComparer for dictionary entries. Operations only look at keys and uses an externally defined equalityComparer for that.

    Inheritance
    System.Object
    KeyValuePairEqualityComparer<K, V>
    Namespace: Lucene.Net.Support.C5
    Assembly: Lucene.Net.dll
    Syntax
    public sealed class KeyValuePairEqualityComparer<K, V> : System.Collections.Generic.IEqualityComparer<KeyValuePair<K, V>>
    Type Parameters
    Name Description
    K
    V

    Constructors

    | Improve this Doc View Source

    KeyValuePairEqualityComparer()

    Create an entry equalityComparer using the default equalityComparer for keys

    Declaration
    public KeyValuePairEqualityComparer()
    | Improve this Doc View Source

    KeyValuePairEqualityComparer(System.Collections.Generic.IEqualityComparer<K>)

    Create an entry equalityComparer from a specified item equalityComparer for the keys

    Declaration
    public KeyValuePairEqualityComparer(System.Collections.Generic.IEqualityComparer<K> keyequalityComparer)
    Parameters
    Type Name Description
    System.Collections.Generic.IEqualityComparer<K> keyequalityComparer

    The key equalitySCG.Comparer

    Methods

    | Improve this Doc View Source

    Equals(KeyValuePair<K, V>, KeyValuePair<K, V>)

    Test two entries for equality

    Declaration
    public bool Equals(KeyValuePair<K, V> entry1, KeyValuePair<K, V> entry2)
    Parameters
    Type Name Description
    KeyValuePair<K, V> entry1

    First entry

    KeyValuePair<K, V> entry2

    Second entry

    Returns
    Type Description
    System.Boolean

    True if keys are equal

    | Improve this Doc View Source

    GetHashCode(KeyValuePair<K, V>)

    Get the hash code of the entry

    Declaration
    public int GetHashCode(KeyValuePair<K, V> entry)
    Parameters
    Type Name Description
    KeyValuePair<K, V> entry

    The entry

    Returns
    Type Description
    System.Int32

    The hash code of the key

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