Package io.deephaven.web.client.api
Class BigIntegerWrapper
java.lang.Object
io.deephaven.web.client.api.BigIntegerWrapper
Wrap BigInteger values for use in JS. Provides text formatting for display and access to the underlying value.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleasNumber()Returns the wrapped value as a number.booleanCompares this wrapper to another object.inthashCode()Returns a hash code based on the wrapped value.static BigIntegerWrapperCreates a wrapper from an integer string.toString()Returns the string representation of the wrappedBigInteger.valueOf()Returns the string representation of this value.
-
Constructor Details
-
BigIntegerWrapper
-
-
Method Details
-
ofString
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
-
asNumber
public double asNumber()Returns the wrapped value as a number.- Returns:
- The
BigIntegervalue converted to a JS Number.
-
valueOf
Returns the string representation of this value.Provided to match JavaScript's
valueOfconvention.- Returns:
- The string form of this value.
-
toString
Returns the string representation of the wrappedBigInteger. -
equals
Compares this wrapper to another object.- Overrides:
equalsin classObject- Parameters:
o- The object to compare.- Returns:
trueifois aBigIntegerWrapperwith an equal wrapped value.
-
hashCode
public int hashCode()Returns a hash code based on the wrapped value.
-