Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class IndexOptionsComparer

    Represents an IndexOptions comparison operation that uses System.Int32 comparison rules.

    Since in .NET the standard comparers will do boxing when comparing enum types, this class was created as a more performant alternative than calling CompareTo() on IndexOptions.

    Inheritance
    System.Object
    IndexOptionsComparer
    Implements
    System.Collections.Generic.IComparer<IndexOptions>
    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.Index
    Assembly: Lucene.Net.dll
    Syntax
    public sealed class IndexOptionsComparer : IComparer<IndexOptions>

    Properties

    | Improve this Doc View Source

    Default

    Gets the default static singleton instance of IndexOptionsComparer.

    Declaration
    public static IComparer<IndexOptions> Default { get; }
    Property Value
    Type Description
    System.Collections.Generic.IComparer<IndexOptions>

    Methods

    | Improve this Doc View Source

    Compare(IndexOptions, IndexOptions)

    Compares two IndexOptions enums and returns an indication of their relative sort order.

    Declaration
    public int Compare(IndexOptions x, IndexOptions y)
    Parameters
    Type Name Description
    IndexOptions x

    An IndexOptions enum to compare to y.

    IndexOptions y

    An IndexOptions enum to compare to x.

    Returns
    Type Description
    System.Int32

    A signed integer that indicates the relative values of x and y, as shown in the following table.

    ValueMeaning
    Less than zero x precedes y in the sort order.
    Zero x is equal to y.
    Greater than zero x follows y in the sort order.

    Implements

    System.Collections.Generic.IComparer<T>
    • Improve this Doc
    • View Source
    Back to top Copyright © 2021 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.