java.lang.Object | |
↳ | com.google.android.gms.wearable.DataMap |
A map of data supported by PutDataMapRequest
and DataMapItem
s.
DataMap may convert to and from Bundles, but will drop any types
not explicitly supported by DataMap in the conversion process.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | TAG |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns an ArrayList of DataMaps from an ArrayList of Bundles.
| |||||||||||
Removes all elements from the mapping of this DataMap.
| |||||||||||
Returns true if the given key is contained in the mapping
of this DataMap.
| |||||||||||
Returns true if the given Object is a DataMap equivalent to
this one.
| |||||||||||
Returns a DataMap from a Bundle.
| |||||||||||
Returns a DataMap from a byte[].
| |||||||||||
Returns the entry with the given key as an object.
| |||||||||||
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.
| |||||||||||
Returns the value associated with the given key, or defaultValue if
no mapping of the desired type exists for the given key.
| |||||||||||
Returns the value associated with the given key, or false if
no mapping of the desired type exists for the given key.
| |||||||||||
Returns the value associated with the given key, or (byte) 0 if
no mapping of the desired type exists for the given key.
| |||||||||||
Returns the value associated with the given key, or defaultValue if
no mapping of the desired type exists for the given 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.
| |||||||||||
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.
| |||||||||||
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.
| |||||||||||
Returns the value associated with the given key, or defaultValue if
no mapping of the desired type exists for the given key.
| |||||||||||
Returns the value associated with the given key, or 0.0 if
no mapping of the desired type exists for the given key.
| |||||||||||
Returns the value associated with the given key, or defaultValue if
no mapping of the desired type exists for the given key.
| |||||||||||
Returns the value associated with the given key, or 0.0f if
no mapping of the desired type exists for the given 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.
| |||||||||||
Returns the value associated with the given key, or defaultValue if
no mapping of the desired type exists for the given key.
| |||||||||||
Returns the value associated with the given key, or 0 if
no mapping of the desired type exists for the given 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.
| |||||||||||
Returns the value associated with the given key, or defaultValue if
no mapping of the desired type exists for the given key.
| |||||||||||
Returns the value associated with the given key, or 0L if
no mapping of the desired type exists for the given 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.
| |||||||||||
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.
| |||||||||||
Returns the value associated with the given key, or defaultValue if
no mapping of the desired type exists for the given 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.
| |||||||||||
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.
| |||||||||||
Returns true if the mapping of this DataMap is empty, false otherwise.
| |||||||||||
Returns a Set containing the Strings used as keys in this DataMap.
| |||||||||||
Inserts all mappings from the given DataMap into this DataMap.
| |||||||||||
Inserts an Asset into the mapping of this DataMap, replacing
any existing Asset for the given key.
| |||||||||||
Inserts a Boolean value into the mapping of this DataMap, replacing
any existing value for the given key.
| |||||||||||
Inserts a byte value into the mapping of this DataMap, replacing
any existing value for the given key.
| |||||||||||
Inserts a byte array value into the mapping of this dataMap, replacing
any existing value for the given key.
| |||||||||||
Inserts a DataMap into the mapping of this DataMap, replacing
any existing DataMap for the given key.
| |||||||||||
Inserts an ArrayList
| |||||||||||
Inserts a double value into the mapping of this DataMap, replacing
any existing value for the given key.
| |||||||||||
Inserts a float value into the mapping of this dataMap, replacing
any existing value for the given key.
| |||||||||||
Inserts a float array value into the mapping of this dataMap, replacing
any existing value for the given key.
| |||||||||||
Inserts an int value into the mapping of this DataMap, replacing
any existing value for the given key.
| |||||||||||
Inserts an ArrayList
| |||||||||||
Inserts a long value into the mapping of this DataMap, replacing
any existing value for the given key.
| |||||||||||
Inserts a long array value into the mapping of this dataMap, replacing
any existing value for the given key.
| |||||||||||
Inserts a String value into the mapping of this DataMap, replacing
any existing value for the given key.
| |||||||||||
Inserts a String array value into the mapping of this dataMap, replacing
any existing value for the given key.
| |||||||||||
Inserts an ArrayList
| |||||||||||
Removes any entry with the given key from the mapping of this dataMap.
| |||||||||||
Returns the number of key-value pairs in this map.
| |||||||||||
Returns a Bundle containing all the elements on this DataMap.
| |||||||||||
Returns a serialized
byte[] representing this DataMap. | |||||||||||
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Returns an ArrayList of DataMaps from an ArrayList of Bundles. Any elements in the Bundles not supported by DataMap will be dropped.
Parameters | |
---|---|
bundleArrayList |
ArrayList
|
Returns | |
---|---|
ArrayList<DataMap> |
an ArrayList of DataMaps |
Removes all elements from the mapping of this DataMap.
Returns true if the given key is contained in the mapping of this DataMap.
Parameters | |
---|---|
key |
String :
a String key |
Returns | |
---|---|
boolean |
true if the key is part of the mapping, false otherwise |
Returns true if the given Object is a DataMap equivalent to this one.
Parameters | |
---|---|
o |
Object
|
Returns | |
---|---|
boolean |
Returns a DataMap from a Bundle. The input Bundle is expected to contain only elements supported by DataMap. Any elements in the Bundle not supported by DataMap will be dropped.
Parameters | |
---|---|
bundle |
Bundle
|
Returns | |
---|---|
DataMap |
a DataMap from a Bundle object |
Returns a DataMap from a byte[].
Parameters | |
---|---|
bytes |
byte :
the bytes of the DataMap to convert |
Returns | |
---|---|
DataMap |
a new DataMap out of the input bytes |
Returns the entry with the given key as an object.
Parameters | |
---|---|
key |
String :
a String key |
Returns | |
---|---|
T |
an Object, or null |
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.
Parameters | |
---|---|
key |
String :
a String, or null |
Returns | |
---|---|
Asset |
an Asset, or null |
Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
Parameters | |
---|---|
key |
String :
a String |
defaultValue |
boolean :
Value to return if key does not exist |
Returns | |
---|---|
boolean |
a boolean value |
Returns the value associated with the given key, or false if no mapping of the desired type exists for the given key.
Parameters | |
---|---|
key |
String :
a String |
Returns | |
---|---|
boolean |
a boolean value |
Returns the value associated with the given key, or (byte) 0 if no mapping of the desired type exists for the given key.
Parameters | |
---|---|
key |
String :
a String |
Returns | |
---|---|
byte |
a byte value |
Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
Parameters | |
---|---|
key |
String :
a String |
defaultValue |
byte :
Value to return if key does not exist |
Returns | |
---|---|
byte |
a byte value |
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.
Parameters | |
---|---|
key |
String :
a String, or null |
Returns | |
---|---|
byte[] |
a byte[] value, or null |
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.
Parameters | |
---|---|
key |
String :
a String, or null |
Returns | |
---|---|
DataMap |
a DataMap, or null |
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.
Parameters | |
---|---|
key |
String :
a String, or null |
Returns | |
---|---|
ArrayList<DataMap> |
an ArrayList |
Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
Parameters | |
---|---|
key |
String :
a String |
defaultValue |
double :
Value to return if key does not exist |
Returns | |
---|---|
double |
a double value |
Returns the value associated with the given key, or 0.0 if no mapping of the desired type exists for the given key.
Parameters | |
---|---|
key |
String :
a String |
Returns | |
---|---|
double |
a double value |
Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
Parameters | |
---|---|
key |
String :
a String |
defaultValue |
float :
Value to return if key does not exist |
Returns | |
---|---|
float |
a float value |
Returns the value associated with the given key, or 0.0f if no mapping of the desired type exists for the given key.
Parameters | |
---|---|
key |
String :
a String |
Returns | |
---|---|
float |
a float value |
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.
Parameters | |
---|---|
key |
String :
a String, or null |
Returns | |
---|---|
float[] |
a float[] value, or null |
Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
Parameters | |
---|---|
key |
String :
a String |
defaultValue |
int :
Value to return if key does not exist |
Returns | |
---|---|
int |
an int value |
Returns the value associated with the given key, or 0 if no mapping of the desired type exists for the given key.
Parameters | |
---|---|
key |
String :
a String |
Returns | |
---|---|
int |
an int value |
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.
Parameters | |
---|---|
key |
String :
a String, or null |
Returns | |
---|---|
ArrayList<Integer> |
an ArrayList |
Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
Parameters | |
---|---|
key |
String :
a String |
defaultValue |
long :
Value to return if key does not exist |
Returns | |
---|---|
long |
a long value |
Returns the value associated with the given key, or 0L if no mapping of the desired type exists for the given key.
Parameters | |
---|---|
key |
String :
a String |
Returns | |
---|---|
long |
a long value |
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.
Parameters | |
---|---|
key |
String :
a String, or null |
Returns | |
---|---|
long[] |
a long[] value, or null |
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.
Parameters | |
---|---|
key |
String :
a String, or null |
Returns | |
---|---|
String |
a String value, or null |
Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
Parameters | |
---|---|
key |
String :
a String, or null |
defaultValue |
String :
Value to return if key does not exist |
Returns | |
---|---|
String |
the String value associated with the given key, or defaultValue if no valid String object is currently mapped to that 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.
Parameters | |
---|---|
key |
String :
a String, or null |
Returns | |
---|---|
String[] |
a String[] value, or null |
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.
Parameters | |
---|---|
key |
String :
a String, or null |
Returns | |
---|---|
ArrayList<String> |
an ArrayList |
Returns | |
---|---|
int |
Returns true if the mapping of this DataMap is empty, false otherwise.
Returns | |
---|---|
boolean |
Returns a Set containing the Strings used as keys in this DataMap.
Returns | |
---|---|
Set<String> |
a Set of String keys |
Inserts all mappings from the given DataMap into this DataMap.
Parameters | |
---|---|
dataMap |
DataMap :
a DataMap
|
Inserts an Asset into the mapping of this DataMap, replacing any existing Asset for the given key. Either key or value may be null.
Parameters | |
---|---|
key |
String :
a String, or null |
value |
Asset :
an Asset, or null
|
Inserts a Boolean value into the mapping of this DataMap, replacing any existing value for the given key. Either key or value may be null.
Parameters | |
---|---|
key |
String :
a String, or null |
value |
boolean :
a Boolean, or null
|
Inserts a byte value into the mapping of this DataMap, replacing any existing value for the given key.
Parameters | |
---|---|
key |
String :
a String, or null |
value |
byte :
a byte
|
Inserts a byte array value into the mapping of this dataMap, replacing any existing value for the given key. Either key or value may be null.
Parameters | |
---|---|
key |
String :
a String, or null |
value |
byte :
a byte array object, or null
|
Inserts a DataMap into the mapping of this DataMap, replacing any existing DataMap for the given key. Either key or value may be null.
Parameters | |
---|---|
key |
String :
a String, or null |
value |
DataMap :
an Asset, or null
|
Inserts an ArrayList
Parameters | |
---|---|
key |
String :
a String, or null |
value |
ArrayList :
an ArrayList |
Inserts a double value into the mapping of this DataMap, replacing any existing value for the given key.
Parameters | |
---|---|
key |
String :
a String, or null |
value |
double :
a double
|
Inserts a float value into the mapping of this dataMap, replacing any existing value for the given key.
Parameters | |
---|---|
key |
String :
a String, or null |
value |
float :
a float
|
Inserts a float array value into the mapping of this dataMap, replacing any existing value for the given key. Either key or value may be null.
Parameters | |
---|---|
key |
String :
a String, or null |
value |
float :
a float array object, or null
|
Inserts an int value into the mapping of this DataMap, replacing any existing value for the given key.
Parameters | |
---|---|
key |
String :
a String, or null |
value |
int :
an int, or null
|
Inserts an ArrayList
Parameters | |
---|---|
key |
String :
a String, or null |
value |
ArrayList :
an ArrayList |
Inserts a long value into the mapping of this DataMap, replacing any existing value for the given key.
Parameters | |
---|---|
key |
String :
a String, or null |
value |
long :
a long
|
Inserts a long array value into the mapping of this dataMap, replacing any existing value for the given key. Either key or value may be null.
Parameters | |
---|---|
key |
String :
a String, or null |
value |
long :
a long array object, or null
|
Inserts a String value into the mapping of this DataMap, replacing any existing value for the given key. Either key or value may be null.
Parameters | |
---|---|
key |
String :
a String, or null |
value |
String :
a String, or null
|
Inserts a String array value into the mapping of this dataMap, replacing any existing value for the given key. Either key or value may be null.
Parameters | |
---|---|
key |
String :
a String, or null |
value |
String :
a String array object, or null
|
Inserts an ArrayList
Parameters | |
---|---|
key |
String :
a String, or null |
value |
ArrayList :
an ArrayList |
Removes any entry with the given key from the mapping of this dataMap.
Parameters | |
---|---|
key |
String :
a String key
|
Returns | |
---|---|
Object |
Returns the number of key-value pairs in this map.
Returns | |
---|---|
int |
Returns a Bundle containing all the elements on this DataMap. A data map converted in this
way should only be read after converting it with fromBundle(Bundle)
.
Returns | |
---|---|
Bundle |
a Bundle containing all supported elements on this DataMap. |
Returns a serialized byte[]
representing this DataMap.
Returns | |
---|---|
byte[] |
Returns | |
---|---|
String |