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 System.Globalization.NumberFormatInfo class in .NET, can be subclassed.

    Inheritance
    System.Object
    NumberFormat
    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)
    Namespace: Lucene.Net.Util
    Assembly: Lucene.Net.dll
    Syntax
    public abstract class NumberFormat

    Constructors

    | Improve this Doc View Source

    NumberFormat(IFormatProvider)

    Declaration
    public NumberFormat(IFormatProvider formatProvider)
    Parameters
    Type Name Description
    System.IFormatProvider formatProvider

    Properties

    | Improve this Doc View Source

    FormatProvider

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

    Methods

    | Improve this Doc View Source

    Format(Double)

    Declaration
    public virtual string Format(double number)
    Parameters
    Type Name Description
    System.Double number
    Returns
    Type Description
    System.String
    | Improve this Doc View Source

    Format(Int64)

    Declaration
    public virtual string Format(long number)
    Parameters
    Type Name Description
    System.Int64 number
    Returns
    Type Description
    System.String
    | Improve this Doc View Source

    Format(Object)

    Declaration
    public virtual string Format(object number)
    Parameters
    Type Name Description
    System.Object number
    Returns
    Type Description
    System.String
    | Improve this Doc View Source

    GetNumberFormat()

    When overridden in a subclass, provides the numeric format as a System.String. Generally, this is the same format that is passed into the method.

    Declaration
    protected virtual string GetNumberFormat()
    Returns
    Type Description
    System.String

    A numeric format string.

    | Improve this Doc View Source

    Parse(String)

    Declaration
    public abstract Number Parse(string source)
    Parameters
    Type Name Description
    System.String source
    Returns
    Type Description
    J2N.Numerics.Number
    | Improve this Doc View Source

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String
    Overrides
    System.Object.ToString()
    • Improve this Doc
    • View Source
    Back to top Copyright © 2022 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.