de.hpi.fgis.dude.util.data.json
Enum JsonValue.JsonType

java.lang.Object
  extended by java.lang.Enum<JsonValue.JsonType>
      extended by de.hpi.fgis.dude.util.data.json.JsonValue.JsonType
All Implemented Interfaces:
Serializable, Comparable<JsonValue.JsonType>
Enclosing interface:
JsonValue

public static enum JsonValue.JsonType
extends Enum<JsonValue.JsonType>

JsonValue.JsonType includes all Json types that can be returned by JsonValue.getType().

Author:
Matthias Pohl

Enum Constant Summary
Array
          The type of an array.
Boolean
          The type of a boolean value.
Null
          null.
Number
          The type of a numerical value.
Record
          The type of a Json record.
String
          The type of a String value.
 
Method Summary
 boolean isAtomic()
          Checks, whether the current type is atomic.
static JsonValue.JsonType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static JsonValue.JsonType[] 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

Null

public static final JsonValue.JsonType Null
null.


Array

public static final JsonValue.JsonType Array
The type of an array.


Boolean

public static final JsonValue.JsonType Boolean
The type of a boolean value.


Number

public static final JsonValue.JsonType Number
The type of a numerical value.


Record

public static final JsonValue.JsonType Record
The type of a Json record.


String

public static final JsonValue.JsonType String
The type of a String value.

Method Detail

values

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

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

valueOf

public static JsonValue.JsonType 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

isAtomic

public boolean isAtomic()
Checks, whether the current type is atomic.

Returns:
true, if the instance does not collect several other Json instances; otherwise false.


Copyright © 2011 Hasso Plattner Institute - Chair of Information Systems. All Rights Reserved.