Enum JsonValueType
- java.lang.Object
-
- java.lang.Enum<JsonValueType>
-
- com.alachisoft.ncache.runtime.JSON.JsonValueType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<JsonValueType>
public enum JsonValueType extends java.lang.Enum<JsonValueType> implements java.io.Serializable
An enum demonstrating the manner of containment of data by the Json class.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static JsonValueType
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 JsonValueType
valueOf(java.lang.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
-
Object
public static final JsonValueType Object
Contained value is in raw value form. This is usually for InProc caches.
-
Binary
public static final JsonValueType Binary
Contained value is in binary form. This is usually for OutProc caches.
-
Json
public static final JsonValueType Json
Contained value is possibly in partially binary form because there was an attempt made to deserialize it on the cache server.
-
-
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(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getValue
public int getValue()
Order is important in enums.By using getValue() method, each enum constant index can be found, just like array index.- Returns:
- enum constant index
-
forValue
public static JsonValueType forValue(int value)
retreives the enum constant of the specified value, if exists.- Parameters:
value
- enum constant index- Returns:
- enum constant
-
-