Enum ObjectType
- java.lang.Object
-
- java.lang.Enum<ObjectType>
-
- org.pepstock.charba.client.commons.ObjectType
-
- All Implemented Interfaces:
Serializable
,Comparable<ObjectType>
public enum ObjectType extends Enum<ObjectType>
Enumerates all java script types.
The latest ECMAScript standard defines seven data types:
Six data types that are primitives:
- Boolean
- Function
- Undefined
- Number
- String
- Symbol
and other 2 objects types:
- Object
- Array
See https://developer.mozilla.org/it/docs/Web/JavaScript/Reference/Operators/typeof- Author:
- Andrea "Stock" Stocchero
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ARRAY
Arrays are regular objects for which there is a particular relationship between integer-key-ed properties and the 'length' property.BOOLEAN
Boolean represents a logical entity and can have two values: true, and false.FUNCTION
Functions are regular objects with the additional capability of being callable.NUMBER
According to the ECMAScript standard, there is only one number type: the double-precision 64-bit binary format IEEE 754 value (numbers between -(2^53 -1) and 2^53 -1).OBJECT
Objects can be seen as a collection of properties.STRING
Is used to represent textual dataSYMBOL
Symbols are new to JavaScript in ECMAScript 2015.UNDEFINED
A variable that has not been assigned a value
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ObjectType
valueOf(String name)
Returns the enum constant of this type with the specified name.static ObjectType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNDEFINED
public static final ObjectType UNDEFINED
A variable that has not been assigned a value
-
BOOLEAN
public static final ObjectType BOOLEAN
Boolean represents a logical entity and can have two values: true, and false.
-
NUMBER
public static final ObjectType NUMBER
According to the ECMAScript standard, there is only one number type: the double-precision 64-bit binary format IEEE 754 value (numbers between -(2^53 -1) and 2^53 -1). There is no specific type for integers. In addition to being able to represent floating-point numbers, the number type has three symbolic values: +Infinity, -Infinity, and NaN (not-a-number).
-
STRING
public static final ObjectType STRING
Is used to represent textual data
-
SYMBOL
public static final ObjectType SYMBOL
Symbols are new to JavaScript in ECMAScript 2015. A Symbol is a unique and immutable primitive value.
-
FUNCTION
public static final ObjectType FUNCTION
Functions are regular objects with the additional capability of being callable.
-
OBJECT
public static final ObjectType OBJECT
Objects can be seen as a collection of properties.
-
ARRAY
public static final ObjectType ARRAY
Arrays are regular objects for which there is a particular relationship between integer-key-ed properties and the 'length' property.
-
-
Method Detail
-
values
public static ObjectType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ObjectType c : ObjectType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ObjectType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-