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 callingCompareTo()
on IndexOptions.
Implements
Inherited Members
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 |
IndexOptions | y | An IndexOptions enum to compare to |
Returns
Type | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
int | A signed integer that indicates the relative values of
|