APIdia Launch Partner
Top Description Fields Constructors Methods
jdk.internal.math

public final Class FloatToDecimal

extends ToDecimal
Class Inheritance
Static Imports
java.lang.Float.*, java.lang.Integer.*, .Math.multiplyHigh, jdk.internal.math.MathUtils.*

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

Field Summary

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

pack-priv static final int
pack-priv static final int
public static final FloatToDecimal
LATIN1

Use LATIN1 encoding to process the in-out byte[] str

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

pack-priv static final int
pack-priv static final int
private static final int
public static final FloatToDecimal
UTF16

Use UTF16 encoding to process the in-out byte[] str

pack-priv static final int
W

Inherited from jdk.internal.math.ToDecimal:
MASK_28MINUS_INFMINUS_ZERONANNON_SPECIALPLUS_INFPLUS_ZERO

Constructor Summary

AccessConstructor and Description
private
FloatToDecimal(boolean latin1)

Method Summary

Modifier and TypeMethod and Description
private int
exponent(byte[] str, int index, int e)

public int
putDecimal(byte[]
the String byte array to append to
str
,
int
the index into str
index
,
float
the float whose rendering is into str.
v
)

Appends the rendering of the v to str.

private static int
rop(long g, long cp)

private int
toChars(byte[] str, int index, int f, int e)

private int
toChars1(byte[] str, int index, int h, int l, int e)

private int
toChars2(byte[] str, int index, int h, int l, int e)

private int
toChars3(byte[] str, int index, int h, int l, int e)

private int
toDecimal(byte[] str, int index, float v)

private int
toDecimal(byte[] str, int index, int q, int c, int dk)

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.

Inherited from jdk.internal.math.ToDecimal:
lengthput8DigitsputCharputDigitputSpecialremoveTrailingZeroesspecialy

Field Detail

BQ_MASKback to summary
private static final int BQ_MASK
C_MAXback to summary
pack-priv static final int C_MAX
C_MINback to summary
pack-priv 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
E_THR_Iback to summary
pack-priv static final int E_THR_I
E_THR_Zback to summary
pack-priv static final int E_THR_Z
Hback to summary
pack-priv static final int H
K_MAXback to summary
pack-priv static final int K_MAX
K_MINback to summary
pack-priv static final int K_MIN
LATIN1back to summary
public static final FloatToDecimal LATIN1

Use LATIN1 encoding to process the in-out byte[] str

MASK_32back to summary
private static final long MASK_32
MAX_CHARSback to summary
public static final int MAX_CHARS
Pback to summary
pack-priv static final int P
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
UTF16back to summary
public static final FloatToDecimal UTF16

Use UTF16 encoding to process the in-out byte[] str

Wback to summary
pack-priv static final int W

Constructor Detail

FloatToDecimalback to summary
private FloatToDecimal(boolean latin1)

Method Detail

exponentback to summary
private int exponent(byte[] str, int index, int e)
putDecimalback to summary
public int putDecimal(byte[] str, int index, float v)

Appends the rendering of the v to str.

The outcome is the same as if v were first rendered and the resulting string were then

Parameters
str:byte[]

the String byte array to append to

index:int

the index into str

v:float

the float whose rendering is into str.

ropback to summary
private static int rop(long g, long cp)
toCharsback to summary
private int toChars(byte[] str, int index, int f, int e)
toChars1back to summary
private int toChars1(byte[] str, int index, int h, int l, int e)
toChars2back to summary
private int toChars2(byte[] str, int index, int h, int l, int e)
toChars3back to summary
private int toChars3(byte[] str, int index, int h, int l, int e)
toDecimalback to summary
private int toDecimal(byte[] str, int index, float v)
toDecimalback to summary
private int toDecimal(byte[] str, int index, int q, int c, int dk)
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)