public interface MetaDataHolder
Modifier and Type | Method and Description |
---|---|
void |
copyMetaData(java.util.Map<java.lang.String,java.lang.Object> bundle)
Copies the metadata in the specified bundle into this metadata.
|
<T> T |
get(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.
|
boolean |
getMetaBoolean(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.
|
void |
getMetaData(java.util.Map<java.lang.String,java.lang.Object> bundle)
Returns a copy of the current metadata in the specified bundle.
|
double |
getMetaDouble(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.
|
int[] |
getMetaIntArray(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.
|
int |
getMetaInteger(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 |
getMetaLong(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.
|
java.util.Map<java.lang.String,java.lang.Object> |
getMetaMap(java.lang.String key)
Returns the bundle associated with the specified key.
|
<T extends android.os.Parcelable> |
getMetaParcelable(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.io.Serializable |
getMetaSerializable(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 |
getMetaString(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.
|
java.util.ArrayList<java.lang.String> |
getMetaStringArrayList(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.
|
boolean |
hasMetaValue(java.lang.String key)
Returns
true if there is a metadata value associated with the specified key,
false otherwise. |
void |
removeMetaData(java.lang.String key)
Removes the metadata associated with the specified key.
|
void |
setMetaBoolean(java.lang.String key,
boolean value)
Inserts a Boolean value into the mapping of this Bundle, replacing
any existing value for the given key.
|
void |
setMetaData(java.util.Map<java.lang.String,java.lang.Object> bundle)
Sets this metadata to the metadata in the specified bundle.
|
void |
setMetaDouble(java.lang.String key,
double value)
Inserts a double value into the mapping of this Bundle, replacing
any existing value for the given key.
|
void |
setMetaIntArray(java.lang.String key,
int[] value)
Inserts an int array value into the mapping of this Bundle, replacing
any existing value for the given key.
|
void |
setMetaInteger(java.lang.String key,
int value)
Inserts an int value into the mapping of this Bundle, replacing
any existing value for the given key.
|
void |
setMetaLong(java.lang.String key,
long value)
Inserts a long value into the mapping of this Bundle, replacing
any existing value for the given key.
|
void |
setMetaMap(java.lang.String key,
java.util.Map<java.lang.String,java.lang.Object> bundle)
Sets the bundle associated with the specified key.
|
void |
setMetaParcelable(java.lang.String key,
android.os.Parcelable value)
Inserts a Parcelable value into the mapping of this Bundle, replacing
any existing value for the given key.
|
void |
setMetaSerializable(java.lang.String key,
java.io.Serializable value)
Inserts a Serializable value into the mapping of this Bundle, replacing
any existing value for the given key.
|
void |
setMetaString(java.lang.String key,
java.lang.String value)
Inserts a String value into the mapping of this Bundle, replacing
any existing value for the given key.
|
void |
setMetaStringArrayList(java.lang.String key,
java.util.ArrayList<java.lang.String> value)
Inserts an ArrayList
|
java.lang.String getMetaString(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.void setMetaString(java.lang.String key, java.lang.String value)
key
- a String, or nullvalue
- a String, or nullint getMetaInteger(java.lang.String key, int defaultValue)
key
- a StringdefaultValue
- Value to return if key does not existvoid setMetaInteger(java.lang.String key, int value)
key
- a String, or nullvalue
- an intdouble getMetaDouble(java.lang.String key, double defaultValue)
key
- a StringdefaultValue
- Value to return if key does not existvoid setMetaDouble(java.lang.String key, double value)
key
- a String, or nullvalue
- a doublelong getMetaLong(java.lang.String key, long defaultValue)
key
- a StringdefaultValue
- Value to return if key does not existvoid setMetaLong(java.lang.String key, long value)
key
- a String, or nullvalue
- a longboolean getMetaBoolean(java.lang.String key, boolean defaultValue)
key
- a StringdefaultValue
- Value to return if key does not existvoid setMetaBoolean(java.lang.String key, boolean value)
key
- a String, or nullvalue
- a booleanjava.util.ArrayList<java.lang.String> getMetaStringArrayList(java.lang.String key)
key
- a String, or nullvoid setMetaStringArrayList(java.lang.String key, java.util.ArrayList<java.lang.String> value)
key
- a String, or nullvalue
- an ArrayListint[] getMetaIntArray(java.lang.String key)
key
- a String, or nullvoid setMetaIntArray(java.lang.String key, int[] value)
key
- a String, or nullvalue
- an int array object, or nulljava.io.Serializable getMetaSerializable(java.lang.String key)
key
- a String, or nullvoid setMetaSerializable(java.lang.String key, java.io.Serializable value)
key
- a String, or nullvalue
- a Serializable object, or null<T extends android.os.Parcelable> T getMetaParcelable(java.lang.String key)
key
- a String, or nullvoid setMetaParcelable(java.lang.String key, android.os.Parcelable value)
key
- a String, or nullvalue
- a Parcelable object, or null<T> T get(java.lang.String key)
key
- a String, or nulljava.util.Map<java.lang.String,java.lang.Object> getMetaMap(java.lang.String key)
key
- void setMetaMap(java.lang.String key, java.util.Map<java.lang.String,java.lang.Object> bundle)
bundle
after the method returns will not be
reflected in the underlying metadata.key
- bundle
- boolean hasMetaValue(java.lang.String key)
true
if there is a metadata value associated with the specified key,
false
otherwise.key
- void setMetaData(java.util.Map<java.lang.String,java.lang.Object> bundle)
bundle
- void copyMetaData(java.util.Map<java.lang.String,java.lang.Object> bundle)
bundle
- void getMetaData(java.util.Map<java.lang.String,java.lang.Object> bundle)
bundle
- void removeMetaData(java.lang.String key)
key
-