Class LongWrapper

java.lang.Object
io.deephaven.web.client.api.LongWrapper
Direct Known Subclasses:
DateWrapper

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

    • LongWrapper

      @JsIgnore protected LongWrapper(long value)
  • Method Details

    • of

      @JsIgnore public static LongWrapper of(long value)
    • ofString

      public static LongWrapper 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, or null if the parsed value is QueryConstants.NULL_LONG.
    • getWrapped

      @JsIgnore public long getWrapped()
    • asNumber

      public double asNumber()
      Returns the wrapped value as a number.
      Returns:
      The wrapped long 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 value.
      Overrides:
      toString in class Object
    • equals

      @JsIgnore public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      @JsIgnore public int hashCode()
      Overrides:
      hashCode in class Object