Package sun.misc
Interface FloatingDecimal.BinaryToASCIIConverter
-
- Enclosing class:
- FloatingDecimal
public static interface FloatingDecimal.BinaryToASCIIConverterA converter which can process single or double precision floating point values into an ASCIIStringrepresentation.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidappendTo(Appendable buf)Appends a floating point value to anAppendable.booleandecimalDigitsExact()Indicates whether the binary to ASCII conversion was exact.booleandigitsRoundedUp()Indicates whether the value was rounded up during the binary to ASCII conversion.intgetDecimalExponent()Retrieves the decimal exponent most closely corresponding to this value.intgetDigits(char[] digits)Retrieves the value as an array of digits.booleanisExceptional()Indicates whether the value is either infinite or not a number.booleanisNegative()Indicates the sign of the value.StringtoJavaFormatString()Converts a floating point value into an ASCIIString.
-
-
-
Method Detail
-
toJavaFormatString
String toJavaFormatString()
Converts a floating point value into an ASCIIString.- Returns:
- The value converted to a
String.
-
appendTo
void appendTo(Appendable buf)
Appends a floating point value to anAppendable.- Parameters:
buf- TheAppendableto receive the value.
-
getDecimalExponent
int getDecimalExponent()
Retrieves the decimal exponent most closely corresponding to this value.- Returns:
- The decimal exponent.
-
getDigits
int getDigits(char[] digits)
Retrieves the value as an array of digits.- Parameters:
digits- The digit array.- Returns:
- The number of valid digits copied into the array.
-
isNegative
boolean isNegative()
Indicates the sign of the value.- Returns:
value < 0.0.
-
isExceptional
boolean isExceptional()
Indicates whether the value is either infinite or not a number.- Returns:
trueif and only if the value isNaNor infinite.
-
digitsRoundedUp
boolean digitsRoundedUp()
Indicates whether the value was rounded up during the binary to ASCII conversion.- Returns:
trueif and only if the value was rounded up.
-
decimalDigitsExact
boolean decimalDigitsExact()
Indicates whether the binary to ASCII conversion was exact.- Returns:
trueif any only if the conversion was exact.
-
-