|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectccc.plugins.s11n.json.JsonImpl
public class JsonImpl
Default implementation of the Json
interface.
Constructor Summary | |
---|---|
JsonImpl()
Constructor. |
|
JsonImpl(Jsonable jsonable)
Constructor. |
|
JsonImpl(org.json.JSONObject detail)
Constructor. |
|
JsonImpl(java.util.Map<java.lang.String,java.lang.String> map)
Constructor. |
|
JsonImpl(java.lang.String detail)
Constructor. |
Method Summary | |
---|---|
Json |
create()
Create a new Json object. |
java.math.BigDecimal |
getBigDecimal(java.lang.String key)
Accessor. |
java.lang.Boolean |
getBool(java.lang.String key)
Accessor. |
java.util.Collection<Json> |
getCollection(java.lang.String key)
Accessor. |
java.util.Date |
getDate(java.lang.String key)
Accessor. |
java.lang.String |
getDetail()
Get the internal state of the snapshot. |
java.util.UUID |
getId(java.lang.String key)
Accessor. |
java.lang.Integer |
getInt(java.lang.String key)
Accessor. |
Json |
getJson(java.lang.String string)
Accessor. |
java.lang.Long |
getLong(java.lang.String key)
Accessor. |
java.lang.String |
getString(java.lang.String key)
Accessor. |
java.util.Map<java.lang.String,java.lang.String> |
getStringMap(java.lang.String key)
Accessor. |
java.util.Collection<java.lang.String> |
getStrings(java.lang.String key)
Accessor. |
void |
set(java.lang.String key,
java.math.BigDecimal value)
Mutator. |
void |
set(java.lang.String key,
java.lang.Boolean value)
Mutator. |
void |
set(java.lang.String key,
java.util.Collection<? extends Jsonable> snapshots)
Mutator. |
void |
set(java.lang.String key,
java.util.Date date)
Mutator. |
void |
set(java.lang.String key,
Json value)
Mutator. |
void |
set(java.lang.String key,
Jsonable value)
Mutator. |
void |
set(java.lang.String key,
java.lang.Long value)
Mutator. |
void |
set(java.lang.String key,
java.util.Map<java.lang.String,java.lang.String> value)
Mutator. |
void |
set(java.lang.String key,
java.lang.String value)
Mutator. |
void |
set(java.lang.String key,
java.util.UUID value)
Mutator. |
void |
setJsons(java.lang.String key,
java.util.Collection<? extends Json> snapshots)
|
void |
setStrings(java.lang.String key,
java.util.Collection<java.lang.String> value)
Mutator. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public JsonImpl(java.lang.String detail)
detail
- The snapshot's detail.public JsonImpl()
public JsonImpl(org.json.JSONObject detail)
detail
- The JSON object this snapshot wraps.public JsonImpl(Jsonable jsonable)
jsonable
- The object to convert to JSON.public JsonImpl(java.util.Map<java.lang.String,java.lang.String> map)
map
- The map to convert into a snapshot.Method Detail |
---|
public java.lang.String getDetail()
public void set(java.lang.String key, java.lang.String value)
set
in interface Json
key
- The key.value
- The value, as a string.public void set(java.lang.String key, java.util.Collection<? extends Jsonable> snapshots)
set
in interface Json
key
- The key.snapshots
- The value, as a collection of Jsonable objects.public void setStrings(java.lang.String key, java.util.Collection<java.lang.String> value)
setStrings
in interface Json
key
- The key.value
- The value, as a collection of strings.public void set(java.lang.String key, java.lang.Boolean value)
set
in interface Json
key
- The key.value
- The value, as a boolean.public void set(java.lang.String key, java.util.Date date)
set
in interface Json
key
- The key.date
- The value, as a date.public void set(java.lang.String key, java.util.UUID value)
set
in interface Json
key
- The key.value
- The value, as an ID.public void set(java.lang.String key, java.lang.Long value)
set
in interface Json
key
- The key.value
- The value, as a long.public void set(java.lang.String key, java.math.BigDecimal value)
set
in interface Json
key
- The key.value
- The value, as a decimal.public void set(java.lang.String key, java.util.Map<java.lang.String,java.lang.String> value)
set
in interface Json
key
- The key.value
- The value, as a map of strings.public void set(java.lang.String key, Jsonable value)
set
in interface Json
key
- The key.value
- The value, as a Jsonable
object.public java.lang.String getString(java.lang.String key)
getString
in interface Json
key
- The key for the value.
public java.util.Collection<Json> getCollection(java.lang.String key)
getCollection
in interface Json
key
- The key for the value.
public java.util.Date getDate(java.lang.String key)
getDate
in interface Json
key
- The key for the value.
public java.lang.Boolean getBool(java.lang.String key)
getBool
in interface Json
key
- The key for the value.
public java.util.UUID getId(java.lang.String key)
getId
in interface Json
key
- The key for the value.
public java.lang.Integer getInt(java.lang.String key)
getInt
in interface Json
key
- The key for the value.
public java.math.BigDecimal getBigDecimal(java.lang.String key)
getBigDecimal
in interface Json
key
- The key for the value.
public Json getJson(java.lang.String string)
getJson
in interface Json
string
- The key for the value.
public java.util.Collection<java.lang.String> getStrings(java.lang.String key)
getStrings
in interface Json
key
- The key for the value.
public java.lang.Long getLong(java.lang.String key)
getLong
in interface Json
key
- The key for the value.
public java.util.Map<java.lang.String,java.lang.String> getStringMap(java.lang.String key)
getStringMap
in interface Json
key
- The key for the value.
public Json create()
create
in interface Json
public void set(java.lang.String key, Json value)
set
in interface Json
key
- The key.value
- The value, as a Json.public void setJsons(java.lang.String key, java.util.Collection<? extends Json> snapshots)
setJsons
in interface Json
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |