public static class JSONUtils.Item extends JSONUtils.Primitive
Constructor and Description |
---|
JSONUtils.Item() |
Modifier and Type | Method and Description |
---|---|
JSONUtils.Item |
add(Enum<?> name,
boolean item)
Add a named item property to the object.
|
JSONUtils.Item |
add(Enum<?> name,
Enum<?> item)
Add a named property to the object.
|
JSONUtils.Item |
add(Enum<?> name,
JSONUtils.Primitive item)
Add a named item property to the object.
|
JSONUtils.Item |
add(Enum<?> name,
long item)
Add a named item property to the object.
|
JSONUtils.Item |
add(Enum<?> name,
String item)
Add a named item property to the object.
|
JSONUtils.Item |
add(String name,
boolean item)
Add a named item property to the object.
|
JSONUtils.Item |
add(String name,
Enum<?> item)
Add a named item property to the object.
|
JSONUtils.Item |
add(String name,
JSONUtils.Primitive item)
Add a named item property to the object.
|
JSONUtils.Item |
add(String name,
long item)
Add a named item property to the object.
|
JSONUtils.Item |
add(String name,
String item)
Add a named item property to the object.
|
boolean |
equals(Object o) |
JSONUtils.Primitive |
get(String key)
Get the entity bound to the specified key in this item.
|
int |
hashCode() |
JSONUtils.Item |
inline()
Mark the specified item to be formatted in-line.
|
Set<String> |
keys()
Get the set of keys holding values within this item.
|
JSONUtils.Item |
remove(Enum<?> name)
Remove a named property from the object.
|
JSONUtils.Item |
remove(String name)
Remove a named property from the object.
|
int |
size()
Returns the number of items contained within this item.
|
String |
toString() |
isInline
public JSONUtils.Item inline()
JSONUtils.Primitive
inline
in class JSONUtils.Primitive
public boolean equals(Object o)
equals
in class JSONUtils.Primitive
public int hashCode()
hashCode
in class JSONUtils.Primitive
public int size()
public Set<String> keys()
public JSONUtils.Primitive get(String key)
key
- entity keypublic String toString()
toString
in class JSONUtils.Primitive
public JSONUtils.Item add(Enum<?> name, JSONUtils.Primitive item)
name
- property name (as an enum constant)item
- item to be addedNullPointerException
- if parameter is nullpublic JSONUtils.Item add(String name, JSONUtils.Primitive item)
name
- property nameitem
- item to be addedNullPointerException
- if parameter is nullpublic JSONUtils.Item add(Enum<?> name, String item)
name
- property name (as an enum constant)item
- item to be addedNullPointerException
- if parameter is nullpublic JSONUtils.Item add(String name, String item)
name
- property nameitem
- item to be addedNullPointerException
- if parameter is nullpublic JSONUtils.Item add(Enum<?> name, long item)
name
- property name (as an enum constant)item
- item to be addedNullPointerException
- if parameter is nullpublic JSONUtils.Item add(String name, long item)
name
- property nameitem
- item to be addedNullPointerException
- if parameter is nullpublic JSONUtils.Item add(Enum<?> name, boolean item)
name
- property name (as an enum constant)item
- item to be addedNullPointerException
- if parameter is nullpublic JSONUtils.Item add(String name, boolean item)
name
- property nameitem
- item to be addedNullPointerException
- if parameter is nullpublic JSONUtils.Item add(Enum<?> name, Enum<?> item)
name
- property name (as an enum constant)item
- item to be addedNullPointerException
- if parameter is nullpublic JSONUtils.Item add(String name, Enum<?> item)
name
- property nameitem
- item to be addedNullPointerException
- if parameter is nullpublic JSONUtils.Item remove(Enum<?> name)
name
- property name (as an enum constant)NullPointerException
- if parameter is nullpublic JSONUtils.Item remove(String name)
name
- property nameNullPointerException
- if parameter is nullCopyright © 2015. All Rights Reserved.