Class JsData

java.lang.Object
io.deephaven.web.client.fu.JsData

public class JsData extends Object
A place to collect utility methods for managing data in/out of javascript / handling column type information.
  • Constructor Details

    • JsData

      public JsData()
  • Method Details

    • newArray

      public static elemental2.core.JsArray<jsinterop.base.Any> newArray(String type)
      Returns:
      a new js array which handles primitive types sanely.
    • getRequiredProperty

      public static jsinterop.base.Any getRequiredProperty(jsinterop.base.JsPropertyMap<Object> source, String propertyName)
      Gets a required property from a JsPropertyMap. Will throw if the value isn't set
      Parameters:
      source - The property map to get the value from
      propertyName - The property to get value for
      Returns:
      The value
    • getProperty

      public static jsinterop.base.Any getProperty(jsinterop.base.JsPropertyMap<Object> source, String propertyName)
    • getProperty

      public static jsinterop.base.Any getProperty(jsinterop.base.JsPropertyMap<Object> source, String propertyName, jsinterop.base.Any defaultValue)
    • getRequiredStringProperty

      public static String getRequiredStringProperty(jsinterop.base.JsPropertyMap<Object> source, String propertyName)
    • getStringProperty

      public static String getStringProperty(jsinterop.base.JsPropertyMap<Object> source, String propertyName)
    • getStringProperty

      public static String getStringProperty(jsinterop.base.JsPropertyMap<Object> source, String propertyName, String defaultValue)
    • getRequiredIntProperty

      public static int getRequiredIntProperty(jsinterop.base.JsPropertyMap<Object> source, String propertyName)
    • getIntProperty

      public static int getIntProperty(jsinterop.base.JsPropertyMap<Object> source, String propertyName)
    • getIntProperty

      public static int getIntProperty(jsinterop.base.JsPropertyMap<Object> source, String propertyName, int defaultValue)
    • getRequiredDoubleProperty

      public static double getRequiredDoubleProperty(jsinterop.base.JsPropertyMap<Object> source, String propertyName)
    • getDoubleProperty

      public static double getDoubleProperty(jsinterop.base.JsPropertyMap<Object> source, String propertyName)
    • getDoubleProperty

      public static double getDoubleProperty(jsinterop.base.JsPropertyMap<Object> source, String propertyName, double defaultValue)
    • getNullableDoubleProperty

      public static Double getNullableDoubleProperty(jsinterop.base.JsPropertyMap<Object> source, String propertyName)
    • getNullableDoubleProperty

      public static Double getNullableDoubleProperty(jsinterop.base.JsPropertyMap<Object> source, String propertyName, Double defaultValue)
    • getRequiredBooleanProperty

      public static boolean getRequiredBooleanProperty(jsinterop.base.JsPropertyMap<Object> source, String propertyName)
    • getBooleanProperty

      public static boolean getBooleanProperty(jsinterop.base.JsPropertyMap<Object> source, String propertyName)
    • getBooleanProperty

      public static boolean getBooleanProperty(jsinterop.base.JsPropertyMap<Object> source, String propertyName, boolean defaultValue)
    • getNullableBooleanProperty

      public static Boolean getNullableBooleanProperty(jsinterop.base.JsPropertyMap<Object> source, String propertyName)
    • getNullableBooleanProperty

      public static Boolean getNullableBooleanProperty(jsinterop.base.JsPropertyMap<Object> source, String propertyName, Boolean defaultValue)