Class NumericValue

    • Constructor Detail

      • NumericValue

        public NumericValue​(@Nonnegative
                            int base,
                            @Nonnull
                            String integer)
    • Method Detail

      • getBase

        @Nonnegative
        public int getBase()
      • getIntegerPart

        @Nonnull
        public String getIntegerPart()
      • getFractionalPart

        @CheckForNull
        public String getFractionalPart()
      • getExponentBase

        @CheckForSigned
        public int getExponentBase()
      • getExponent

        @CheckForNull
        public String getExponent()
      • getFlags

        public int getFlags()
      • toBigDecimal

        @Nonnull
        public BigDecimal toBigDecimal()
        So, it turns out that parsing arbitrary bases into arbitrary precision numbers is nontrivial, and this routine gets it wrong in many important cases.
      • toJavaLangNumber

        @Nonnull
        public Number toJavaLangNumber()
      • intValue

        public int intValue()
        Specified by:
        intValue in class Number
      • longValue

        public long longValue()
        Specified by:
        longValue in class Number
      • floatValue

        public float floatValue()
        Specified by:
        floatValue in class Number
      • doubleValue

        public double doubleValue()
        Specified by:
        doubleValue in class Number