Class BigIntegerWrapper

java.lang.Object
io.deephaven.web.client.api.BigIntegerWrapper

@JsType(namespace="dh") public class BigIntegerWrapper extends Object
Wrap BigInteger values for use in JS. Provides text formatting for display and access to the underlying value.
  • Constructor Details

    • BigIntegerWrapper

      @JsIgnore public BigIntegerWrapper(@Nonnull BigInteger value)
  • Method Details

    • ofString

      public static BigIntegerWrapper ofString(String str)
      Creates a wrapper from an integer string. The provided string may start with + or -, and must otherwise only contain the digits 0-9.
      Parameters:
      str - A string representation of an integer.
      Returns:
      A wrapper for the parsed value.
    • getWrapped

      @JsIgnore public BigInteger getWrapped()
    • asNumber

      public double asNumber()
      Returns the wrapped value as a number.
      Returns:
      The BigInteger value converted to a JS Number.
    • valueOf

      public String valueOf()
      Returns the string representation of this value.

      Provided to match JavaScript's valueOf convention.

      Returns:
      The string form of this value.
    • toString

      public String toString()
      Returns the string representation of the wrapped BigInteger.
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Compares this wrapper to another object.
      Overrides:
      equals in class Object
      Parameters:
      o - The object to compare.
      Returns:
      true if o is a BigIntegerWrapper with an equal wrapped value.
    • hashCode

      public int hashCode()
      Returns a hash code based on the wrapped value.
      Overrides:
      hashCode in class Object