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 SourceDefault
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 SourceCompare(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 | ||||||||
---|---|---|---|---|---|---|---|---|---|
System.Int32 | A signed integer that indicates the relative values of
|
Implements
System.Collections.Generic.IComparer<T>