java.io.Serializable
public enum JsonDataType extends java.lang.Enum<JsonDataType> implements java.io.Serializable
Enum Constant | Description |
---|---|
Array |
Contained data is a Json array.
|
Boolean |
Contained data is of boolean type.
|
Null |
Contained data is null.
|
Number |
Contained data is of number type.
|
Object |
Contained data is a Json Object class.
|
String |
Contained data is of string type.
|
Modifier and Type | Method | Description |
---|---|---|
static JsonDataType |
forValue(int value) |
Retreives the enum constant of the specified value, if exists.
|
int |
getValue() |
Order is important in enums.By using getValue() method, each enum constant index can be found, just like array index.
|
static JsonDataType |
valueOf(java.lang.String name) |
Returns the enum constant of this type with the specified name.
|
static JsonDataType[] |
values() |
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final JsonDataType Null
public static final JsonDataType Boolean
public static final JsonDataType Number
public static final JsonDataType String
public static final JsonDataType Object
public static final JsonDataType Array
public static JsonDataType[] values()
for (JsonDataType c : JsonDataType.values()) System.out.println(c);
public static JsonDataType valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic int getValue()
public static JsonDataType forValue(int value)
value
- Enum constant index.