public abstract class ECHODataObject<S extends ECHODataObject<S>> extends ECHOObject
修飾子とタイプ | メソッドと説明 |
---|---|
S |
accumulate(java.lang.String name,
java.lang.Object value)
Appends value to the array already mapped to name.
|
int |
describeContents() |
static ECHODataObject<?> |
factory(JSONObject data)
Factory method of particular data objects.
|
java.lang.Object |
get(java.lang.String name)
Returns the value mapped by name, or throws if no such mapping exists.
|
ECHOACLObject |
getACL()
|
boolean |
getBoolean(java.lang.String name)
Returns the value mapped by name if it exists and is a boolean or can be coerced to a boolean, or throws otherwise.
|
double |
getDouble(java.lang.String name)
Returns the value mapped by name if it exists and is a double or can be coerced to a double, or throws otherwise.
|
int |
getInt(java.lang.String name)
Returns the value mapped by name if it exists and is an int or can be coerced to an int, or throws otherwise.
|
JSONArray |
getJSONArray(java.lang.String name)
Returns the value mapped by name if it exists and is a JSONArray, or throws otherwise.
|
JSONObject |
getJSONObject(java.lang.String name)
Returns the value mapped by name if it exists and is a JSONObject, or throws otherwise.
|
long |
getLong(java.lang.String name)
Returns the value mapped by name if it exists and is a long or can be coerced to a long, or throws otherwise.
|
java.lang.String |
getString(java.lang.String name)
Returns the value mapped by name if it exists, coercing it if necessary, or throws if no such mapping exists.
|
boolean |
has(java.lang.String name)
Returns true if this object has a mapping for name.
|
boolean |
isNull(java.lang.String name)
Returns true if this object has no mapping for name or if it has a mapping whose value is NULL.
|
java.util.Iterator<java.lang.String> |
keys()
Returns an iterator of the String names in this object.
|
int |
length()
Returns the number of name/value mappings in this object.
|
JSONArray |
names()
Returns an array containing the string names in this object.
|
java.lang.Object |
opt(java.lang.String name)
Returns the value mapped by name, or null if no such mapping exists.
|
boolean |
optBoolean(java.lang.String name)
Returns the value mapped by name if it exists and is a boolean or can be coerced to a boolean, or false otherwise.
|
boolean |
optBoolean(java.lang.String name,
boolean fallback)
Returns the value mapped by name if it exists and is a boolean or can be coerced to a boolean, or fallback otherwise.
|
double |
optDouble(java.lang.String name)
Returns the value mapped by name if it exists and is a double or can be coerced to a double, or NaN otherwise.
|
double |
optDouble(java.lang.String name,
double fallback)
Returns the value mapped by name if it exists and is a double or can be coerced to a double, or fallback otherwise.
|
int |
optInt(java.lang.String name)
Returns the value mapped by name if it exists and is an int or can be coerced to an int, or 0 otherwise.
|
int |
optInt(java.lang.String name,
int fallback)
Returns the value mapped by name if it exists and is an int or can be coerced to an int, or fallback otherwise.
|
JSONArray |
optJSONArray(java.lang.String name)
Returns the value mapped by name if it exists and is a JSONArray, or null otherwise.
|
JSONObject |
optJSONObject(java.lang.String name)
Returns the value mapped by name if it exists and is a JSONObject, or null otherwise.
|
long |
optLong(java.lang.String name)
Returns the value mapped by name if it exists and is a long or can be coerced to a long, or 0 otherwise.
|
long |
optLong(java.lang.String name,
long fallback)
Returns the value mapped by name if it exists and is a long or can be coerced to a long, or fallback otherwise.
|
java.lang.String |
optString(java.lang.String name)
Returns the value mapped by name if it exists, coercing it if necessary, or the empty string if no such mapping exists.
|
java.lang.String |
optString(java.lang.String name,
java.lang.String fallback)
Returns the value mapped by name if it exists, coercing it if necessary, or fallback if no such mapping exists.
|
S |
put(java.lang.String name,
boolean value)
Maps name to value, clobbering any existing name/value mapping with the same name.
|
S |
put(java.lang.String name,
double value)
Maps name to value, clobbering any existing name/value mapping with the same name.
|
S |
put(java.lang.String name,
int value)
Maps name to value, clobbering any existing name/value mapping with the same name.
|
S |
put(java.lang.String name,
long value)
Maps name to value, clobbering any existing name/value mapping with the same name.
|
S |
put(java.lang.String name,
java.lang.Object value)
Maps name to value, clobbering any existing name/value mapping with the same name.
|
S |
putOpt(java.lang.String name,
java.lang.Object value)
Equivalent to put(name, value) when both parameters are non-null; does nothing otherwise.
|
java.lang.Object |
remove(java.lang.String name)
Removes the named mapping if it exists; does nothing otherwise.
|
void |
setNewACL(ECHOACLObject newACL)
{@.ja 新しいACLをセットする。
|
JSONArray |
toJSONArray(JSONArray name)
Equivalent to put(name, value) when both parameters are non-null; does nothing otherwise.
|
java.lang.String |
toString()
Encodes this object as a compact JSON string, such as:
{"query":"Pizza","locations":[94043,90210]}
|
java.lang.String |
toString(int indentSpaces)
Encodes this object as a human readable JSON string for debugging, such as:
{
"query": "Pizza",
"locations": [
94043,
90210
]
}
|
void |
writeToParcel(Parcel out,
int flags) |
equals, getRefid, hashCode
public static ECHODataObject<?> factory(JSONObject data)
data
- a source JSONObjectpublic ECHOACLObject getACL()
public void setNewACL(ECHOACLObject newACL)
public S accumulate(java.lang.String name, java.lang.Object value) throws ECHOException
ECHOException
public java.lang.Object get(java.lang.String name) throws ECHOException
ECHOException
public boolean getBoolean(java.lang.String name) throws ECHOException
ECHOException
public double getDouble(java.lang.String name) throws ECHOException
ECHOException
public int getInt(java.lang.String name) throws ECHOException
ECHOException
public JSONArray getJSONArray(java.lang.String name) throws ECHOException
ECHOException
public JSONObject getJSONObject(java.lang.String name) throws ECHOException
ECHOException
public long getLong(java.lang.String name) throws ECHOException
ECHOException
public java.lang.String getString(java.lang.String name) throws ECHOException
ECHOException
public boolean has(java.lang.String name)
public boolean isNull(java.lang.String name)
public java.util.Iterator<java.lang.String> keys()
public int length()
ECHOException
public JSONArray names()
public java.lang.Object opt(java.lang.String name)
public boolean optBoolean(java.lang.String name)
public boolean optBoolean(java.lang.String name, boolean fallback)
public double optDouble(java.lang.String name, double fallback)
public double optDouble(java.lang.String name)
public int optInt(java.lang.String name, int fallback)
public int optInt(java.lang.String name)
public JSONArray optJSONArray(java.lang.String name)
public JSONObject optJSONObject(java.lang.String name)
public long optLong(java.lang.String name)
public long optLong(java.lang.String name, long fallback)
public java.lang.String optString(java.lang.String name)
public java.lang.String optString(java.lang.String name, java.lang.String fallback)
public S put(java.lang.String name, int value) throws ECHOException
ECHOException
public S put(java.lang.String name, long value) throws ECHOException
ECHOException
public S put(java.lang.String name, java.lang.Object value) throws ECHOException
ECHOException
public S put(java.lang.String name, boolean value) throws ECHOException
ECHOException
public S put(java.lang.String name, double value) throws ECHOException
ECHOException
public S putOpt(java.lang.String name, java.lang.Object value) throws ECHOException
ECHOException
public java.lang.Object remove(java.lang.String name)
public JSONArray toJSONArray(JSONArray name) throws ECHOException
ECHOException
public java.lang.String toString()
{"query":"Pizza","locations":[94043,90210]}
toString
クラス内 java.lang.Object
ECHOException
public java.lang.String toString(int indentSpaces) throws ECHOException
{ "query": "Pizza", "locations": [ 94043, 90210 ] }
indentSpaces
- the number of spaces to indent for each level of nesting.ECHOException
public int describeContents()
public void writeToParcel(Parcel out, int flags)