Enum Class JsonTokenKind
- All Implemented Interfaces:
Serializable,Comparable<JsonTokenKind>,Constable
Enumeration of all token kinds that occur in the JSON language. Tokens of some kinds (such as
a boolean that can be either 'true' or 'false') have a value,
while other kinds have a static value (such as begin_object,
which is always '{') that is not represented inside of the token.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionbooleanhasValue()returns true, iff the token kind has a (variable) value.static JsonTokenKindReturns the enum constant of this class with the specified name.static JsonTokenKind[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
STRING
-
NUMBER
-
BOOLEAN
-
BEGIN_ARRAY
-
END_ARRAY
-
BEGIN_OBJECT
-
END_OBJECT
-
NULL
-
COMMA
-
COLON
-
WHITESPACE
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
hasValue
public boolean hasValue()returns true, iff the token kind has a (variable) value.- Returns:
-