public enum NodeType extends Enum<NodeType>
| Enum Constant and Description |
|---|
ARRAY
Array nodes
|
BOOLEAN
Boolean nodes
|
INTEGER
Integer nodes
|
NULL
Null nodes
|
NUMBER
Number nodes (ie, decimal numbers)
|
OBJECT
Object nodes
|
STRING
String nodes
|
| Modifier and Type | Field and Description |
|---|---|
private String |
name
The name for this type, as encountered in a JSON schema
|
private static Map<String,NodeType> |
nameMap |
private static Map<JsonToken,NodeType> |
reverseMap
Mapping of
JsonToken back to node types (used in
getNodeType(JsonNode)) |
| Modifier and Type | Method and Description |
|---|---|
static NodeType |
fromName(String name)
Given a type name, return the corresponding node type
|
static NodeType |
getNodeType(JsonNode node)
Given a
JsonNode as an argument, return its type. |
String |
toString() |
static NodeType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static NodeType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final NodeType ARRAY
public static final NodeType BOOLEAN
public static final NodeType INTEGER
public static final NodeType NUMBER
public static final NodeType NULL
public static final NodeType OBJECT
public static final NodeType STRING
private final String name
private static final Map<JsonToken,NodeType> reverseMap
JsonToken back to node types (used in
getNodeType(JsonNode))public static NodeType[] values()
for (NodeType c : NodeType.values()) System.out.println(c);
public static NodeType valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant
with the specified nameNullPointerException - if the argument is nullpublic static NodeType fromName(String name)
name - the type namepublic static NodeType getNodeType(JsonNode node)
JsonNode as an argument, return its type. The argument
MUST NOT BE NULL, and MUST NOT be a MissingNodenode - the node to determine the type ofCopyright © 2012. All Rights Reserved.