public final class Globals extends Object
Modifier and Type | Field and Description |
---|---|
static Object[] |
arguments
Accesses the current method arguments (
arguments implicit
variable in JavaScript). |
static double |
Infinity
The constant representing an infinite number.
|
static double |
NaN
The constant representing a number that is "Not A Number".
|
static ProxyConstructor |
Proxy |
static Object |
undefined
The JavaScript
undefined global property. |
Modifier and Type | Method and Description |
---|---|
static String |
decodeURI(String encodedURI)
Gets the unencoded version of an encoded Uniform Resource Identifier
(URI).
|
static String |
decodeURI(String encodedURI)
Gets the unencoded version of an encoded Uniform Resource Identifier
(URI).
|
static String |
decodeURIComponent(String encodedURIComponent)
Gets the unencoded version of an encoded component of a Uniform Resource
Identifier (URI).
|
static String |
decodeURIComponent(String encodedURIComponent)
Gets the unencoded version of an encoded component of a Uniform Resource
Identifier (URI).
|
static String |
encodeURI(String uri)
Encodes a text string as a valid Uniform Resource Identifier (URI)
|
static String |
encodeURI(String uri)
Encodes a text string as a valid Uniform Resource Identifier (URI)
|
static String |
encodeURIComponent(String uriComponent)
Encodes a text string as a valid component of a Uniform Resource
Identifier (URI).
|
static String |
encodeURIComponent(String uriComponent)
Encodes a text string as a valid component of a Uniform Resource
Identifier (URI).
|
static <T> T |
eval(String x)
Evaluates JavaScript code and executes it.
|
static <T> T |
eval(String x)
Evaluates JavaScript code and executes it.
|
static Boolean |
isFinite(double number)
Determines whether a supplied number is finite.
|
static Boolean |
isNaN(double number)
Returns a Boolean value that indicates whether a value is the reserved
value NaN (not a number).
|
static double |
parseFloat(String string)
Converts a string to a floating-point number.
|
static int |
parseInt(String s)
Converts A string to an integer.
|
static int |
parseInt(String s)
Converts A string to an integer.
|
static double |
parseInt(String s,
double radix)
Converts A string to an integer.
|
public static final double NaN
public static final double Infinity
public static final Object undefined
undefined
global property.public static final Object[] arguments
arguments
implicit
variable in JavaScript). This variable is only available within
functions.public static ProxyConstructor Proxy
public static <T> T eval(String x)
x
- A String value that contains valid JavaScript code.public static <T> T eval(String x)
x
- A String value that contains valid JavaScript code.public static double parseInt(String s, double radix)
s
- A string to convert into a number.radix
- A value between 2 and 36 that specifies the base of the number
in numString. If this argument is not supplied, strings with a
prefix of '0x' are considered hexadecimal. All other strings
are considered decimal.public static double parseFloat(String string)
string
- A string that contains a floating-point number.public static Boolean isNaN(double number)
number
- A numeric value.public static Boolean isFinite(double number)
number
- Any numeric value.public static String decodeURI(String encodedURI)
encodedURI
- A value representing an encoded URI.public static String decodeURI(String encodedURI)
encodedURI
- A value representing an encoded URI.public static String decodeURIComponent(String encodedURIComponent)
encodedURIComponent
- A value representing an encoded URI component.public static String decodeURIComponent(String encodedURIComponent)
encodedURIComponent
- A value representing an encoded URI component.public static String encodeURI(String uri)
uri
- A value representing an encoded URI.public static String encodeURI(String uri)
uri
- A value representing an encoded URI.public static String encodeURIComponent(String uriComponent)
uriComponent
- A value representing an encoded URI component.public static String encodeURIComponent(String uriComponent)
uriComponent
- A value representing an encoded URI component.public static int parseInt(String s)
s
- A string to convert into a number.radix
- A value between 2 and 36 that specifies the base of the number
in numString. If this argument is not supplied, strings with a
prefix of '0x' are considered hexadecimal. All other strings
are considered decimal.public static int parseInt(String s)
s
- A string to convert into a number.radix
- A value between 2 and 36 that specifies the base of the number
in numString. If this argument is not supplied, strings with a
prefix of '0x' are considered hexadecimal. All other strings
are considered decimal.