Class LabelAndValue
Single label and its value, usually contained in a FacetResult.
Implements
Inherited Members
Namespace: Lucene.Net.Facet
Assembly: Lucene.Net.Facet.dll
Syntax
public sealed class LabelAndValue : IFormattable
Constructors
LabelAndValue(string, int)
Constructor for intvalue
. Makes the ToString() method
print the value
as an int with no decimal.
Declaration
public LabelAndValue(string label, int value)
Parameters
Type | Name | Description |
---|---|---|
string | label | |
int | value |
LabelAndValue(string, float)
Constructor for floatvalue
. Makes the ToString() method
print the value
as a float with at least 1 number after the decimal.
Declaration
public LabelAndValue(string label, float value)
Parameters
Type | Name | Description |
---|---|---|
string | label | |
float | value |
Properties
Label
Facet's label.
Declaration
public string Label { get; }
Property Value
Type | Description |
---|---|
string |
TypeOfValue
The original data type of Value that was passed through the constructor.
Declaration
public Type TypeOfValue { get; }
Property Value
Type | Description |
---|---|
Type |
Value
Value associated with this label.
Declaration
public float Value { get; }
Property Value
Type | Description |
---|---|
float |
Methods
Equals(object?)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object? other)
Parameters
Type | Name | Description |
---|---|---|
object | other |
Returns
Type | Description |
---|---|
bool | true if the specified object is equal to the current object; otherwise, false. |
Overrides
GetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A hash code for the current object. |
Overrides
ToString()
Converts the value of this instance to its equivalent string representation.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | The string representation of the label and value of this instance. |
Overrides
ToString(IFormatProvider?)
Converts the value of this instance to its equivalent string representation using the specified culture-specific format information.
Declaration
public string ToString(IFormatProvider? provider)
Parameters
Type | Name | Description |
---|---|---|
IFormatProvider | provider |
Returns
Type | Description |
---|---|
string | The string representation of the label and value of this instance
as specified by |