Package sun.misc

Interface FloatingDecimal.BinaryToASCIIConverter

  • Enclosing class:
    FloatingDecimal

    public static interface FloatingDecimal.BinaryToASCIIConverter
    A converter which can process single or double precision floating point values into an ASCII String representation.
    • Method Detail

      • toJavaFormatString

        String toJavaFormatString()
        Converts a floating point value into an ASCII String.
        Returns:
        The value converted to a String.
      • appendTo

        void appendTo​(Appendable buf)
        Appends a floating point value to an Appendable.
        Parameters:
        buf - The Appendable to 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:
        true if and only if the value is NaN or infinite.
      • digitsRoundedUp

        boolean digitsRoundedUp()
        Indicates whether the value was rounded up during the binary to ASCII conversion.
        Returns:
        true if and only if the value was rounded up.
      • decimalDigitsExact

        boolean decimalDigitsExact()
        Indicates whether the binary to ASCII conversion was exact.
        Returns:
        true if any only if the conversion was exact.