net.arnx.jsonic
Enum JSONEventType

java.lang.Object
  extended by java.lang.Enum<JSONEventType>
      extended by net.arnx.jsonic.JSONEventType
All Implemented Interfaces:
Serializable, Comparable<JSONEventType>

public enum JSONEventType
extends Enum<JSONEventType>

JSON event types for Pull Parser (getReader).


Enum Constant Summary
BOOLEAN
          JSON true or false
COMMENT
          Single line or Multi line comment.
END_ARRAY
          Ends JSON array.
END_OBJECT
          Ends JSON object.
NAME
          JSON object name.
NULL
          JSON null
NUMBER
          JSON number.
START_ARRAY
          Starts JSON array.
START_OBJECT
          Starts JSON object.
STRING
          JSON string.
WHITESPACE
          White spaces
 
Method Summary
static JSONEventType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static JSONEventType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

START_OBJECT

public static final JSONEventType START_OBJECT
Starts JSON object.


END_OBJECT

public static final JSONEventType END_OBJECT
Ends JSON object.


START_ARRAY

public static final JSONEventType START_ARRAY
Starts JSON array.


END_ARRAY

public static final JSONEventType END_ARRAY
Ends JSON array.


NAME

public static final JSONEventType NAME
JSON object name.


STRING

public static final JSONEventType STRING
JSON string.


NUMBER

public static final JSONEventType NUMBER
JSON number.


BOOLEAN

public static final JSONEventType BOOLEAN
JSON true or false


NULL

public static final JSONEventType NULL
JSON null


WHITESPACE

public static final JSONEventType WHITESPACE
White spaces


COMMENT

public static final JSONEventType COMMENT
Single line or Multi line comment.

Method Detail

values

public static JSONEventType[] 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 (JSONEventType c : JSONEventType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static JSONEventType 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 name
NullPointerException - if the argument is null