Package io.deephaven.web.client.api
Class LongWrapper
java.lang.Object
io.deephaven.web.client.api.LongWrapper
- Direct Known Subclasses:
DateWrapper
Wrap
long 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.booleanlonginthashCode()static LongWrapperof(long value) static LongWrapperCreates a wrapper from an integer string.toString()Returns the string representation of the wrapped value.valueOf()Returns the string representation of this value.
-
Constructor Details
-
LongWrapper
@JsIgnore protected LongWrapper(long value)
-
-
Method Details
-
of
-
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, or
nullif the parsed value isQueryConstants.NULL_LONG.
-
getWrapped
@JsIgnore public long getWrapped() -
asNumber
public double asNumber()Returns the wrapped value as a number.- Returns:
- The wrapped
longconverted 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 wrapped value. -
equals
-
hashCode
@JsIgnore public int hashCode()
-