Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class NumberFormat

    A LUCENENET specific class that represents a numeric format. This class mimicks the design of Java's NumberFormat class, which unlike the NumberFormatInfo class in .NET, can be subclassed.

    Inheritance
    object
    NumberFormat
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Lucene.Net.Util
    Assembly: Lucene.Net.dll
    Syntax
    public abstract class NumberFormat

    Constructors

    NumberFormat(IFormatProvider)

    A LUCENENET specific class that represents a numeric format. This class mimicks the design of Java's NumberFormat class, which unlike the NumberFormatInfo class in .NET, can be subclassed.

    Declaration
    protected NumberFormat(IFormatProvider formatProvider)
    Parameters
    Type Name Description
    IFormatProvider formatProvider

    Properties

    FormatProvider

    A LUCENENET specific class that represents a numeric format. This class mimicks the design of Java's NumberFormat class, which unlike the NumberFormatInfo class in .NET, can be subclassed.

    Declaration
    public IFormatProvider FormatProvider { get; }
    Property Value
    Type Description
    IFormatProvider

    Methods

    Format(double)

    A LUCENENET specific class that represents a numeric format. This class mimicks the design of Java's NumberFormat class, which unlike the NumberFormatInfo class in .NET, can be subclassed.

    Declaration
    public virtual string Format(double number)
    Parameters
    Type Name Description
    double number
    Returns
    Type Description
    string

    Format(long)

    A LUCENENET specific class that represents a numeric format. This class mimicks the design of Java's NumberFormat class, which unlike the NumberFormatInfo class in .NET, can be subclassed.

    Declaration
    public virtual string Format(long number)
    Parameters
    Type Name Description
    long number
    Returns
    Type Description
    string

    Format(object)

    A LUCENENET specific class that represents a numeric format. This class mimicks the design of Java's NumberFormat class, which unlike the NumberFormatInfo class in .NET, can be subclassed.

    Declaration
    public virtual string Format(object number)
    Parameters
    Type Name Description
    object number
    Returns
    Type Description
    string

    GetNumberFormat()

    When overridden in a subclass, provides the numeric format as a string. Generally, this is the same format that is passed into the Format(IFormatProvider, string, object) method.

    Declaration
    protected virtual string GetNumberFormat()
    Returns
    Type Description
    string

    A numeric format string.

    Parse(string)

    A LUCENENET specific class that represents a numeric format. This class mimicks the design of Java's NumberFormat class, which unlike the NumberFormatInfo class in .NET, can be subclassed.

    Declaration
    public abstract Number Parse(string source)
    Parameters
    Type Name Description
    string source
    Returns
    Type Description
    Number

    ToString()

    Returns a string that represents the current object.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A string that represents the current object.

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