public class JSValue
extends java.lang.Object
Browser.executeScript(String)
method execution.Modifier and Type | Method and Description |
---|---|
static JSValue |
create(boolean value) |
static JSValue |
create(double value) |
static JSValue |
create(java.lang.String value) |
static JSValue |
createNull() |
static JSValue |
createObject() |
static JSValue |
createUndefined() |
boolean |
getBoolean()
Returns value of JavaScript Boolean value.
|
int |
getInteger()
Returns value of JavaScript Number value.
|
double |
getNumber()
Returns value of JavaScript Number value.
|
java.lang.String |
getString()
Returns value of JavaScript String value.
|
boolean |
isBoolean()
Indicates whether JavaScript value is a boolean value.
|
boolean |
isFalse()
Indicates whether JavaScript value represents boolean FALSE value.
|
boolean |
isNull()
Indicates whether JavaScript value is NULL.
|
boolean |
isNumber()
Indicates whether JavaScript value is a number value which equals to double type.
|
boolean |
isObject()
Indicates whether JavaScript value is an object.
|
boolean |
isString()
Indicates whether JavaScript value is a string.
|
boolean |
isTrue()
Indicates whether JavaScript value represents boolean TRUE value.
|
boolean |
isUndefined()
Indicates whether JavaScript value is undefined.
|
java.lang.String |
toString() |
public static JSValue create(double value)
public static JSValue create(boolean value)
public static JSValue createUndefined()
public static JSValue create(java.lang.String value)
public static JSValue createNull()
public static JSValue createObject()
public boolean isUndefined()
TRUE
when JavaScript value is undefined.public boolean isObject()
TRUE
when JavaScript value is an object.public boolean isNull()
TRUE
when JavaScript value is NULL.public boolean isTrue()
TRUE
when JavaScript value represents boolean TRUE value.public boolean isFalse()
TRUE
when JavaScript value represents boolean FALSE value.public boolean isString()
TRUE
when JavaScript value is a string.public boolean isBoolean()
TRUE
when JavaScript value is a boolean value.public boolean isNumber()
TRUE
when JavaScript value is a number value.public boolean getBoolean()
isBoolean()
method. If the JavaScript value is not a
Boolean value, then this method by default returns false
.public double getNumber()
isNumber()
method. If the JavaScript value is not a
Number value, then this method by default returns 0.0.public int getInteger()
isNumber()
method. If the JavaScript value is not a
Number value, then this method by default returns 0.0.public java.lang.String getString()
isString()
method. If the JavaScript value is not a
String value, then this method by default returns null
.public java.lang.String toString()
toString
in class java.lang.Object