Show / Hide Table of Contents

    Class KeyValuePairComparer<K, V>

    Default comparer for dictionary entries in a sorted dictionary. Entry comparisons only look at keys and uses an externally defined comparer for that.

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

    Constructors

    | Improve this Doc View Source

    KeyValuePairComparer(System.Collections.Generic.IComparer<K>)

    Create an entry comparer for a item comparer of the keys

    Declaration
    public KeyValuePairComparer(System.Collections.Generic.IComparer<K> comparer)
    Parameters
    Type Name Description
    System.Collections.Generic.IComparer<K> comparer

    Comparer of keys

    Methods

    | Improve this Doc View Source

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

    Compare two entries

    Declaration
    public int Compare(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.Int32

    The result of comparing the keys

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