Class JavaDoubleBitsFromCharSequence


final class JavaDoubleBitsFromCharSequence extends AbstractJavaFloatingPointBitsFromCharSequence
Parses a double from a CharSequence.
  • Constructor Details

    • JavaDoubleBitsFromCharSequence

      public JavaDoubleBitsFromCharSequence()
      Creates a new instance.
  • Method Details

    • nan

      long nan()
      Specified by:
      nan in class AbstractJavaFloatingPointBitsFromCharSequence
      Returns:
      a NaN constant in the specialized type wrapped in a long
    • negativeInfinity

      long negativeInfinity()
      Specified by:
      negativeInfinity in class AbstractJavaFloatingPointBitsFromCharSequence
      Returns:
      a negative infinity constant in the specialized type wrapped in a long
    • positiveInfinity

      long positiveInfinity()
      Specified by:
      positiveInfinity in class AbstractJavaFloatingPointBitsFromCharSequence
      Returns:
      a positive infinity constant in the specialized type wrapped in a long
    • valueOfFloatLiteral

      long valueOfFloatLiteral(CharSequence str, int startIndex, int endIndex, boolean isNegative, long significand, int exponent, boolean isSignificandTruncated, int exponentOfTruncatedSignificand)
      Description copied from class: AbstractJavaFloatingPointBitsFromCharSequence
      Computes a float value from the given components of a decimal float literal.
      Specified by:
      valueOfFloatLiteral in class AbstractJavaFloatingPointBitsFromCharSequence
      Parameters:
      str - the string that contains the float literal (and maybe more)
      startIndex - the start index (inclusive) of the float literal inside the string
      endIndex - the end index (exclusive) of the float literal inside the string
      isNegative - whether the float value is negative
      significand - the significand of the float value (can be truncated)
      exponent - the exponent of the float value
      isSignificandTruncated - whether the significand is truncated
      exponentOfTruncatedSignificand - the exponent value of the truncated significand
      Returns:
      the bit pattern of the parsed value, if the input is legal; otherwise, -1L.
    • valueOfHexLiteral

      long valueOfHexLiteral(CharSequence str, int startIndex, int endIndex, boolean isNegative, long significand, int exponent, boolean isSignificandTruncated, int exponentOfTruncatedSignificand)
      Description copied from class: AbstractJavaFloatingPointBitsFromCharSequence
      Computes a float value from the given components of a hexadecimal float literal.
      Specified by:
      valueOfHexLiteral in class AbstractJavaFloatingPointBitsFromCharSequence
      Parameters:
      str - the string that contains the float literal (and maybe more)
      startIndex - the start index (inclusive) of the float literal inside the string
      endIndex - the end index (exclusive) of the float literal inside the string
      isNegative - whether the float value is negative
      significand - the significand of the float value (can be truncated)
      exponent - the exponent of the float value
      isSignificandTruncated - whether the significand is truncated
      exponentOfTruncatedSignificand - the exponent value of the truncated significand
      Returns:
      the bit pattern of the parsed value, if the input is legal; otherwise, -1L.