Package com.github.tnakamot.json.value
Enum JSONValueType
- java.lang.Object
-
- java.lang.Enum<JSONValueType>
-
- com.github.tnakamot.json.value.JSONValueType
-
- All Implemented Interfaces:
Serializable
,Comparable<JSONValueType>
public enum JSONValueType extends Enum<JSONValueType>
Represents a type of a JSON value.- See Also:
- RFC 8259 - 3. Values
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static JSONValueType
valueOf(String name)
Returns the enum constant of this type with the specified name.static JSONValueType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
STRING
public static final JSONValueType STRING
-
NUMBER
public static final JSONValueType NUMBER
-
BOOLEAN
public static final JSONValueType BOOLEAN
-
NULL
public static final JSONValueType NULL
-
OBJECT
public static final JSONValueType OBJECT
-
ARRAY
public static final JSONValueType ARRAY
-
-
Method Detail
-
values
public static JSONValueType[] 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 (JSONValueType c : JSONValueType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static JSONValueType 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
-
-