Class NumericValue

java.lang.Object
java.lang.Number
foundry.veil.lib.anarres.cpp.NumericValue
All Implemented Interfaces:
Serializable

public class NumericValue extends Number
See Also:
  • Field Details

  • Constructor Details

    • NumericValue

      public NumericValue(int base, @NotNull @NotNull String integer)
  • Method Details

    • getBase

      public int getBase()
    • getIntegerPart

      @NotNull public @NotNull String getIntegerPart()
    • getFractionalPart

      @Nullable public @Nullable String getFractionalPart()
    • getExponentBase

      public int getExponentBase()
    • getExponent

      @Nullable public @Nullable String getExponent()
    • getFlags

      public int getFlags()
    • toBigDecimal

      @NotNull public @NotNull 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

      @NotNull public @NotNull 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
    • toString

      public String toString()
      Overrides:
      toString in class Object