Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class LabelAndValue

    Single label and its value, usually contained in a FacetResult.

    Inheritance
    object
    LabelAndValue
    Implements
    IFormattable
    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    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
    object.Equals(object)

    GetHashCode()

    Serves as the default hash function.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    A hash code for the current object.

    Overrides
    object.GetHashCode()

    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
    object.ToString()

    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 provider.

    Implements

    IFormattable
    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.