public class MapData extends DefaultMetaDataHolder
Constructor and Description |
---|
MapData() |
Modifier and Type | Method and Description |
---|---|
boolean |
containsKey(java.lang.String key)
Returns true if the given key is contained in the mapping
of this class.
|
boolean |
getBoolean(java.lang.String key)
Returns the value associated with the given key, or false if
no mapping of the desired type exists for the given key.
|
boolean |
getBoolean(java.lang.String key,
boolean defaultValue)
Returns the value associated with the given key, or defaultValue if
no mapping of the desired type exists for the given key.
|
double |
getDouble(java.lang.String key)
Returns the value associated with the given key, or 0.0 if
no mapping of the desired type exists for the given key.
|
double |
getDouble(java.lang.String key,
double defaultValue)
Returns the value associated with the given key, or defaultValue if
no mapping of the desired type exists for the given key.
|
float |
getFloat(java.lang.String key)
Returns the value associated with the given key, or 0.0f if
no mapping of the desired type exists for the given key.
|
float |
getFloat(java.lang.String key,
float defaultValue)
Returns the value associated with the given key, or defaultValue if
no mapping of the desired type exists for the given key.
|
int |
getInt(java.lang.String key)
Returns the value associated with the given key, or 0L if
no mapping of the desired type exists for the given key.
|
int |
getInt(java.lang.String key,
int defaultValue)
Returns the value associated with the given key, or defaultValue if
no mapping of the desired type exists for the given key.
|
long |
getLong(java.lang.String key)
Returns the value associated with the given key, or 0L if
no mapping of the desired type exists for the given key.
|
long |
getLong(java.lang.String key,
long defaultValue)
Returns the value associated with the given key, or defaultValue if
no mapping of the desired type exists for the given key.
|
<T extends android.os.Parcelable> |
getParcelable(java.lang.String key)
Retrieves the data referenced by the key and if the key is not found, returns the default.
|
java.lang.String |
getString(java.lang.String key)
Returns the value associated with the given key, or null if
no mapping of the desired type exists for the given key or a null
value is explicitly associated with the key.
|
java.lang.String |
getString(java.lang.String key,
java.lang.String defaultValue)
Returns the value associated with the given key, or defaultValue if
no mapping of the desired type exists for the given key or if a null
value is explicitly associated with the given key.
|
void |
putBoolean(java.lang.String key,
boolean value)
Inserts a Boolean value into the mapping of this class, replacing
any existing value for the given key.
|
void |
putDouble(java.lang.String key,
double value)
Inserts a double value into the mapping of this class, replacing
any existing value for the given key.
|
void |
putFloat(java.lang.String key,
float value)
Inserts a float value into the mapping of this class, replacing
any existing value for the given key.
|
void |
putInt(java.lang.String key,
int value)
Inserts a long value into the mapping of this class, replacing
any existing value for the given key.
|
void |
putLong(java.lang.String key,
long value)
Inserts a long value into the mapping of this class, replacing
any existing value for the given key.
|
void |
putParcelable(java.lang.String key,
android.os.Parcelable value)
Adds an iten referenced by the key.
|
void |
putString(java.lang.String key,
java.lang.String defaultValue)
Inserts a String value into the mapping of this class, replacing
any existing value for the given key.
|
void |
remove(java.lang.String key)
Removes any entry with the given key from the mapping of this class.
|
bundleToMetaMap, copyMetaData, get, getMetaBoolean, getMetaData, getMetaDouble, getMetaIntArray, getMetaInteger, getMetaLong, getMetaMap, getMetaParcelable, getMetaSerializable, getMetaString, getMetaStringArrayList, hasMetaValue, metaMapToBundle, removeMetaData, setMetaBoolean, setMetaData, setMetaDouble, setMetaIntArray, setMetaInteger, setMetaLong, setMetaMap, setMetaParcelable, setMetaSerializable, setMetaString, setMetaStringArrayList
public java.lang.String getString(java.lang.String key, java.lang.String defaultValue)
key
- a String, or nulldefaultValue
- Value to return if key does not exist or if a null
value is associated with the given key.public java.lang.String getString(java.lang.String key)
key
- a String, or nullpublic void putString(java.lang.String key, java.lang.String defaultValue)
key
- a String, or nulldefaultValue
- a String, or nullpublic long getLong(java.lang.String key, long defaultValue)
key
- a StringdefaultValue
- Value to return if key does not existpublic long getLong(java.lang.String key)
key
- a Stringpublic void putLong(java.lang.String key, long value)
key
- a String, or nullvalue
- a longpublic int getInt(java.lang.String key, int defaultValue)
key
- a StringdefaultValue
- Value to return if key does not existpublic int getInt(java.lang.String key)
key
- a Stringpublic void putInt(java.lang.String key, int value)
key
- a String, or nullvalue
- a intpublic boolean getBoolean(java.lang.String key, boolean defaultValue)
key
- a StringdefaultValue
- Value to return if key does not existpublic boolean getBoolean(java.lang.String key)
key
- a Stringpublic void putBoolean(java.lang.String key, boolean value)
key
- a String, or nullvalue
- a Boolean, or nullpublic <T extends android.os.Parcelable> T getParcelable(java.lang.String key)
key
- the key that identifies the datapublic void putParcelable(java.lang.String key, android.os.Parcelable value)
key
- the key used to reference the datavalue
- the value to be referenced.public float getFloat(java.lang.String key, float defaultValue)
key
- a StringdefaultValue
- Value to return if key does not existpublic float getFloat(java.lang.String key)
key
- a Stringpublic void putFloat(java.lang.String key, float value)
key
- a String, or nullvalue
- a floatpublic double getDouble(java.lang.String key, double defaultValue)
key
- a StringdefaultValue
- Value to return if key does not existpublic double getDouble(java.lang.String key)
key
- a Stringpublic void putDouble(java.lang.String key, double value)
key
- a String, or nullvalue
- a doublepublic void remove(java.lang.String key)
key
- a String keypublic boolean containsKey(java.lang.String key)
key
- a String key