Top Description Fields Constructors Methods
jdk.internal.math

public final Class FloatToDecimal

extends Object
Class Inheritance
Imports
java.io.IOException

This class exposes a method to render a float as a string.

Field Summary

Modifier and TypeField and Description
private static final int
private final byte[]
private static final int
pack-priv static final int
pack-priv static final int
pack-priv static final int
pack-priv static final int
H

private int
pack-priv static final int
pack-priv static final int
private static final int
private static final long
public static final int
private static final int
private static final int
private static final int
private static final int
pack-priv static final int
P

private static final int
private static final int
pack-priv static final int
pack-priv static final int
private static final int
private static final int
W

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private void
append(int c)

private void
private Appendable
private void
appendDigit(int d)

public static Appendable
appendTo(float
the float whose rendering is appended.
v
,
Appendable
the Appendable to append to.
app
)

Appends the rendering of the v to app.

private String
private void
exponent(int e)

private void
private static int
rop(long g, long cp)

private int
toChars(int f, int e)

private int
toChars1(int h, int l, int e)

private int
toChars2(int h, int l, int e)

private int
toChars3(int h, int l, int e)

private int
toDecimal(float v)

private int
toDecimal(int q, int c, int dk)

private String
toDecimalString(float v)

public static String

Returns:

a string representation of the argument.
toString
(float
the float to be converted.
v
)

Returns a string representation of the float argument.

private int
y(int a)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

BQ_MASKback to summary
private static final int BQ_MASK
bytesback to summary
private final byte[] bytes
C_MINback to summary
private static final int C_MIN
C_TINYback to summary
pack-priv static final int C_TINY
E_MAXback to summary
pack-priv static final int E_MAX
E_MINback to summary
pack-priv static final int E_MIN
Hback to summary
pack-priv static final int H
indexback to summary
private int index
K_MAXback to summary
pack-priv static final int K_MAX
K_MINback to summary
pack-priv static final int K_MIN
MASK_28back to summary
private static final int MASK_28
MASK_32back to summary
private static final long MASK_32
MAX_CHARSback to summary
public static final int MAX_CHARS
MINUS_INFback to summary
private static final int MINUS_INF
MINUS_ZEROback to summary
private static final int MINUS_ZERO
NANback to summary
private static final int NAN
NON_SPECIALback to summary
private static final int NON_SPECIAL
Pback to summary
pack-priv static final int P
PLUS_INFback to summary
private static final int PLUS_INF
PLUS_ZEROback to summary
private static final int PLUS_ZERO
Q_MAXback to summary
pack-priv static final int Q_MAX
Q_MINback to summary
pack-priv static final int Q_MIN
T_MASKback to summary
private static final int T_MASK
Wback to summary
private static final int W

Constructor Detail

FloatToDecimalback to summary
private FloatToDecimal()

Method Detail

appendback to summary
private void append(int c)
append8Digitsback to summary
private void append8Digits(int m)
appendDecimalToback to summary
private Appendable appendDecimalTo(float v, Appendable app) throws IOException
appendDigitback to summary
private void appendDigit(int d)
appendToback to summary
public static Appendable appendTo(float v, Appendable app) throws IOException

Appends the rendering of the v to app.

The outcome is the same as if v were first rendered and the resulting string were then appended to app.

Parameters
v:float

the float whose rendering is appended.

app:Appendable

the Appendable to append to.

Exceptions
IOException:
If an I/O error occurs
charsToStringback to summary
private String charsToString()
Annotations
@SuppressWarnings:deprecation
exponentback to summary
private void exponent(int e)
removeTrailingZeroesback to summary
private void removeTrailingZeroes()
ropback to summary
private static int rop(long g, long cp)
toCharsback to summary
private int toChars(int f, int e)
toChars1back to summary
private int toChars1(int h, int l, int e)
toChars2back to summary
private int toChars2(int h, int l, int e)
toChars3back to summary
private int toChars3(int h, int l, int e)
toDecimalback to summary
private int toDecimal(float v)
toDecimalback to summary
private int toDecimal(int q, int c, int dk)
toDecimalStringback to summary
private String toDecimalString(float v)
toStringback to summary
public static String toString(float v)

Returns a string representation of the float argument. All characters mentioned below are ASCII characters.

Parameters
v:float

the float to be converted.

Returns:String

a string representation of the argument.

See Also
Float#toString(float)
yback to summary
private int y(int a)