Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class IndexOptionsComparer

    Represents an IndexOptions comparison operation that uses int 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
    object
    IndexOptionsComparer
    Implements
    IComparer<IndexOptions>
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Lucene.Net.Index
    Assembly: Lucene.Net.dll
    Syntax
    [Serializable]
    public sealed class IndexOptionsComparer : IComparer<IndexOptions>

    Properties

    Default

    Gets the default static singleton instance of IndexOptionsComparer.

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

    Methods

    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
    int

    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

    IComparer<T>
    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.