|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcc.plural.jsonij.Value
public abstract class Value
Value is extended by every JSON internalType implementation. This class provides generic access to all values to make life a little easier when traversing the JSON Document.
| Nested Class Summary | |
|---|---|
static class |
Value.TYPE
Type enumeration. |
| Field Summary | |
|---|---|
protected Value.TYPE |
valueType
Current Value Type |
| Constructor Summary | |
|---|---|
Value()
Constructor for Value. |
|
| Method Summary | |
|---|---|
int |
compareTo(Value o)
|
boolean |
equals(Object obj)
|
Value |
get(CharSequence key)
Gets a Value at a key for the current Value. |
Value |
get(int i)
Extracts a Value instance at an Index. |
boolean |
getBoolean()
Finds the boolean representation for the Value. |
double |
getDouble()
Finds the double representation for the Value. |
int |
getInt()
Finds the int representation for the Value. |
Number |
getNumber()
Finds the Number representation for the Value. |
String |
getString()
Finds the String representation for the Value. |
Value.TYPE |
getValueType()
Accessor for the Value TYPE. |
boolean |
has(String key)
Tests if there is a Value at the specified key. |
int |
hashCode()
|
protected abstract Value.TYPE |
internalType()
Internal Method to find the internalType for the Object. |
boolean |
isNull()
|
abstract int |
nestedSize()
Finds the nested elements under this Value. |
int |
size()
Retrieves the size of the Value. |
abstract String |
toJSON()
Converts the current Value into a JSON String that represents it. |
String |
toString()
Default toString for a JSON Value. |
Value.TYPE |
type()
Accessor for the Value TYPE. |
Set<CharSequence> |
valueKeySet()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected Value.TYPE valueType
| Constructor Detail |
|---|
public Value()
| Method Detail |
|---|
protected abstract Value.TYPE internalType()
public Value.TYPE getValueType()
public Value.TYPE type()
public int size()
public abstract int nestedSize()
public boolean isNull()
public boolean getBoolean()
public int getInt()
public double getDouble()
public Number getNumber()
public String getString()
public Value get(int i)
i - The index to get the value for.
public boolean has(String key)
key - Key to extract the value from.
public Set<CharSequence> valueKeySet()
public Value get(CharSequence key)
key - Key to extract the value from.
public abstract String toJSON()
public String toString()
toString in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic int compareTo(Value o)
compareTo in interface Comparable<Value>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||