Class JxValue
- java.lang.Object
- 
- com.inductiveautomation.perspective.designer.model.JxValue
 
- 
 public class JxValue extends java.lang.Object
- 
- 
Constructor SummaryConstructors Constructor Description JxValue(java.lang.Object value)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<java.lang.Double>asDouble()If the value is aNumber, or is aStringvalue parsable as a number, will return an optional containing a Double representation of the value.java.util.Optional<java.lang.Integer>asInt()If the value is aNumber, or is aStringvalue parsable as a number, will return an optional containing an Integer representation of the value.java.util.Optional<com.teamdev.jxbrowser.js.JsObject>asJsObject()java.util.Optional<java.lang.Long>asLong()Get an Optional containing a Long if the value held is aLong, aNumber, or a String that is parseable to a Number.java.util.Optional<java.lang.String>asString()java.lang.ObjectgetRawValue()booleanisJsObject()booleanisNumber()booleanisString()com.inductiveautomation.ignition.common.gson.JsonElementtoJson()java.lang.StringtoString()
 
- 
- 
- 
Method Detail- 
asJsObjectpublic java.util.Optional<com.teamdev.jxbrowser.js.JsObject> asJsObject() - Returns:
- an optional containing the raw JsObjectheld by this value, if and only if the original value was a JsObject, otherwise returnsOptional.empty()
 
 - 
asIntpublic java.util.Optional<java.lang.Integer> asInt() If the value is aNumber, or is aStringvalue parsable as a number, will return an optional containing an Integer representation of the value. Otherwise will return an empty optional.
 - 
asDoublepublic java.util.Optional<java.lang.Double> asDouble() If the value is aNumber, or is aStringvalue parsable as a number, will return an optional containing a Double representation of the value. Otherwise will return an empty optional.
 - 
asLongpublic java.util.Optional<java.lang.Long> asLong() Get an Optional containing a Long if the value held is aLong, aNumber, or a String that is parseable to a Number. Otherwise returns an empty Optional.
 - 
asStringpublic java.util.Optional<java.lang.String> asString() - Returns:
- Optional containing Stringif the javascript source value was a string literal or String.
 
 - 
isStringpublic boolean isString() - Returns:
- true if the held value is an instance of String
 
 - 
isNumberpublic boolean isNumber() - Returns:
- true if the value is an instance of Number. Will not coerce or parse.
 
 - 
isJsObjectpublic boolean isJsObject() - Returns:
- true if the value held is a JsObject. If true, the originating value may be a javascript object literal, an instance of a javascript Object, or an array.
 
 - 
toJsonpublic com.inductiveautomation.ignition.common.gson.JsonElement toJson() 
 - 
getRawValue@Nullable public java.lang.Object getRawValue() - Returns:
- the raw value contained. May be null if originating JxBrowser value was null or undefined.
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 
- 
 
-