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>
    Implements
    System.Collections.Generic.IComparer<KeyValuePair<K, V>>
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Lucene.Net.Support.C5
    Assembly: Lucene.Net.dll
    Syntax
    public class KeyValuePairComparer<K, V> : IComparer<KeyValuePair<K, V>>
    Type Parameters
    Name Description
    K
    V

    Constructors

    | Improve this Doc View Source

    KeyValuePairComparer(IComparer<K>)

    Create an entry comparer for a item comparer of the keys

    Declaration
    public KeyValuePairComparer(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

    Implements

    System.Collections.Generic.IComparer<T>

    Extension Methods

    Number.IsNumber(Object)
    • Improve this Doc
    • View Source
    Back to top Copyright © 2019 Licensed to the Apache Software Foundation (ASF)