# DataMap

public class **DataMap** extends [Object](https://developer.android.com/reference/java/lang/Object.html)  
A map of data supported by `https://developers.google.com/android/reference/com/google/android/gms/wearable/PutDataMapRequest`
and `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMapItem`s.

`https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap` may
convert to and from Bundles, but will drop any types not explicitly supported by DataMap in
the conversion process.

### Constant Summary

|---|---|---|
| [String](https://developer.android.com/reference/java/lang/String.html) | [TAG](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#TAG) |   |

### Public Constructor Summary

|---|---|
|   | [DataMap](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#DataMap())() |

### Public Method Summary

|---|---|
| static [ArrayList](https://developer.android.com/reference/java/util/ArrayList.html)\<[DataMap](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap)\> | [arrayListFromBundleArrayList](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#arrayListFromBundleArrayList(java.util.ArrayList<android.os.Bundle>))([ArrayList](https://developer.android.com/reference/java/util/ArrayList.html)\<[Bundle](https://developer.android.com/reference/android/os/Bundle.html)\> bundleArrayList) Returns an `ArrayList` of `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`s from an `ArrayList` of `Bundle`s. |
| void | [clear](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#clear())() Removes all elements from the mapping of this `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`. |
| boolean | [containsKey](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#containsKey(java.lang.String))([String](https://developer.android.com/reference/java/lang/String.html) key) Returns true if the given key is contained in the mapping of this `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`. |
| boolean | [equals](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#equals(java.lang.Object))([Object](https://developer.android.com/reference/java/lang/Object.html) o) Returns true if the given Object is a `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap` equivalent to this one. |
| static [DataMap](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap) | [fromBundle](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#fromBundle(android.os.Bundle))([Bundle](https://developer.android.com/reference/android/os/Bundle.html) bundle) Returns a `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap` from a `Bundle`. |
| static [DataMap](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap) | [fromByteArray](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#fromByteArray(byte[]))(byte\[\] bytes) Returns a `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap` from a byte\[\]. |
| \<T\> T | [get](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#get(java.lang.String))([String](https://developer.android.com/reference/java/lang/String.html) key) Returns the entry with the given key as an object. |
| [Asset](https://developers.google.com/android/reference/com/google/android/gms/wearable/Asset) | [getAsset](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#getAsset(java.lang.String))([String](https://developer.android.com/reference/java/lang/String.html) 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 | [getBoolean](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#getBoolean(java.lang.String,%20boolean))([String](https://developer.android.com/reference/java/lang/String.html) 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. |
| boolean | [getBoolean](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#getBoolean(java.lang.String))([String](https://developer.android.com/reference/java/lang/String.html) key) Returns the value associated with the given key, or false if no mapping of the desired type exists for the given key. |
| byte | [getByte](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#getByte(java.lang.String))([String](https://developer.android.com/reference/java/lang/String.html) key) Returns the value associated with the given key, or (byte) 0 if no mapping of the desired type exists for the given key. |
| byte | [getByte](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#getByte(java.lang.String,%20byte))([String](https://developer.android.com/reference/java/lang/String.html) key, byte defaultValue) Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key. |
| byte\[\] | [getByteArray](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#getByteArray(java.lang.String))([String](https://developer.android.com/reference/java/lang/String.html) 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. |
| [DataMap](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap) | [getDataMap](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#getDataMap(java.lang.String))([String](https://developer.android.com/reference/java/lang/String.html) 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. |
| [ArrayList](https://developer.android.com/reference/java/util/ArrayList.html)\<[DataMap](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap)\> | [getDataMapArrayList](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#getDataMapArrayList(java.lang.String))([String](https://developer.android.com/reference/java/lang/String.html) 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. |
| double | [getDouble](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#getDouble(java.lang.String,%20double))([String](https://developer.android.com/reference/java/lang/String.html) 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. |
| double | [getDouble](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#getDouble(java.lang.String))([String](https://developer.android.com/reference/java/lang/String.html) key) Returns the value associated with the given key, or 0.0 if no mapping of the desired type exists for the given key. |
| float | [getFloat](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#getFloat(java.lang.String,%20float))([String](https://developer.android.com/reference/java/lang/String.html) 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. |
| float | [getFloat](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#getFloat(java.lang.String))([String](https://developer.android.com/reference/java/lang/String.html) 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\[\] | [getFloatArray](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#getFloatArray(java.lang.String))([String](https://developer.android.com/reference/java/lang/String.html) 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 | [getInt](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#getInt(java.lang.String,%20int))([String](https://developer.android.com/reference/java/lang/String.html) 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. |
| int | [getInt](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#getInt(java.lang.String))([String](https://developer.android.com/reference/java/lang/String.html) key) Returns the value associated with the given key, or 0 if no mapping of the desired type exists for the given key. |
| [ArrayList](https://developer.android.com/reference/java/util/ArrayList.html)\<[Integer](https://developer.android.com/reference/java/lang/Integer.html)\> | [getIntegerArrayList](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#getIntegerArrayList(java.lang.String))([String](https://developer.android.com/reference/java/lang/String.html) 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. |
| long | [getLong](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#getLong(java.lang.String,%20long))([String](https://developer.android.com/reference/java/lang/String.html) 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. |
| long | [getLong](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#getLong(java.lang.String))([String](https://developer.android.com/reference/java/lang/String.html) key) Returns the value associated with the given key, or 0L if no mapping of the desired type exists for the given key. |
| long\[\] | [getLongArray](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#getLongArray(java.lang.String))([String](https://developer.android.com/reference/java/lang/String.html) 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. |
| [String](https://developer.android.com/reference/java/lang/String.html) | [getString](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#getString(java.lang.String))([String](https://developer.android.com/reference/java/lang/String.html) 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. |
| [String](https://developer.android.com/reference/java/lang/String.html) | [getString](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#getString(java.lang.String,%20java.lang.String))([String](https://developer.android.com/reference/java/lang/String.html) key, [String](https://developer.android.com/reference/java/lang/String.html) defaultValue) Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key. |
| [String\[\]](https://developer.android.com/reference/java/lang/String.html) | [getStringArray](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#getStringArray(java.lang.String))([String](https://developer.android.com/reference/java/lang/String.html) 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. |
| [ArrayList](https://developer.android.com/reference/java/util/ArrayList.html)\<[String](https://developer.android.com/reference/java/lang/String.html)\> | [getStringArrayList](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#getStringArrayList(java.lang.String))([String](https://developer.android.com/reference/java/lang/String.html) 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 | [hashCode](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#hashCode())() |
| boolean | [isEmpty](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#isEmpty())() Returns true if the mapping of this `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap` is empty, false otherwise. |
| [Set](https://developer.android.com/reference/java/util/Set.html)\<[String](https://developer.android.com/reference/java/lang/String.html)\> | [keySet](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#keySet())() Returns a Set containing the Strings used as keys in this `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`. |
| void | [putAll](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#putAll(com.google.android.gms.wearable.DataMap))([DataMap](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap) dataMap) Inserts all mappings from the given `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap` into this `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`. |
| void | [putAsset](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#putAsset(java.lang.String,%20com.google.android.gms.wearable.Asset))([String](https://developer.android.com/reference/java/lang/String.html) key, [Asset](https://developers.google.com/android/reference/com/google/android/gms/wearable/Asset) value) Inserts an `https://developers.google.com/android/reference/com/google/android/gms/wearable/Asset` into the mapping of this `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`, replacing any existing `https://developers.google.com/android/reference/com/google/android/gms/wearable/Asset` for the given key. |
| void | [putBoolean](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#putBoolean(java.lang.String,%20boolean))([String](https://developer.android.com/reference/java/lang/String.html) key, boolean value) Inserts a boolean value into the mapping of this `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`, replacing any existing value for the given key. |
| void | [putByte](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#putByte(java.lang.String,%20byte))([String](https://developer.android.com/reference/java/lang/String.html) key, byte value) Inserts a byte value into the mapping of this `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`, replacing any existing value for the given key. |
| void | [putByteArray](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#putByteArray(java.lang.String,%20byte[]))([String](https://developer.android.com/reference/java/lang/String.html) key, byte\[\] value) Inserts a byte array value into the mapping of this `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`, replacing any existing value for the given key. |
| void | [putDataMap](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#putDataMap(java.lang.String,%20com.google.android.gms.wearable.DataMap))([String](https://developer.android.com/reference/java/lang/String.html) key, [DataMap](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap) value) Inserts a `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap` into the mapping of this `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`, replacing any existing `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap` for the given key. |
| void | [putDataMapArrayList](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#putDataMapArrayList(java.lang.String,%20java.util.ArrayList<com.google.android.gms.wearable.DataMap>))([String](https://developer.android.com/reference/java/lang/String.html) key, [ArrayList](https://developer.android.com/reference/java/util/ArrayList.html)\<[DataMap](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap)\> value) Inserts an `ArrayList<DataMap>` value into the mapping of this `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`, replacing any existing value for the given key. |
| void | [putDouble](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#putDouble(java.lang.String,%20double))([String](https://developer.android.com/reference/java/lang/String.html) key, double value) Inserts a double value into the mapping of this `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`, replacing any existing value for the given key. |
| void | [putFloat](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#putFloat(java.lang.String,%20float))([String](https://developer.android.com/reference/java/lang/String.html) key, float value) Inserts a float value into the mapping of this `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`, replacing any existing value for the given key. |
| void | [putFloatArray](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#putFloatArray(java.lang.String,%20float[]))([String](https://developer.android.com/reference/java/lang/String.html) key, float\[\] value) Inserts a float array value into the mapping of this `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`, replacing any existing value for the given key. |
| void | [putInt](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#putInt(java.lang.String,%20int))([String](https://developer.android.com/reference/java/lang/String.html) key, int value) Inserts an int value into the mapping of this `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`, replacing any existing value for the given key. |
| void | [putIntegerArrayList](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#putIntegerArrayList(java.lang.String,%20java.util.ArrayList<java.lang.Integer>))([String](https://developer.android.com/reference/java/lang/String.html) key, [ArrayList](https://developer.android.com/reference/java/util/ArrayList.html)\<[Integer](https://developer.android.com/reference/java/lang/Integer.html)\> value) Inserts an `ArrayList<Integer>` value into the mapping of this `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`, replacing any existing value for the given key. |
| void | [putLong](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#putLong(java.lang.String,%20long))([String](https://developer.android.com/reference/java/lang/String.html) key, long value) Inserts a long value into the mapping of this `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`, replacing any existing value for the given key. |
| void | [putLongArray](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#putLongArray(java.lang.String,%20long[]))([String](https://developer.android.com/reference/java/lang/String.html) key, long\[\] value) Inserts a long array value into the mapping of this `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`, replacing any existing value for the given key. |
| void | [putString](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#putString(java.lang.String,%20java.lang.String))([String](https://developer.android.com/reference/java/lang/String.html) key, [String](https://developer.android.com/reference/java/lang/String.html) value) Inserts a String value into the mapping of this `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`, replacing any existing value for the given key. |
| void | [putStringArray](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#putStringArray(java.lang.String,%20java.lang.String[]))([String](https://developer.android.com/reference/java/lang/String.html) key, [String\[\]](https://developer.android.com/reference/java/lang/String.html) value) Inserts a String array value into the mapping of this `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`, replacing any existing value for the given key. |
| void | [putStringArrayList](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#putStringArrayList(java.lang.String,%20java.util.ArrayList<java.lang.String>))([String](https://developer.android.com/reference/java/lang/String.html) key, [ArrayList](https://developer.android.com/reference/java/util/ArrayList.html)\<[String](https://developer.android.com/reference/java/lang/String.html)\> value) Inserts an `ArrayList<String>` value into the mapping of this `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`, replacing any existing value for the given key. |
| [Object](https://developer.android.com/reference/java/lang/Object.html) | [remove](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#remove(java.lang.String))([String](https://developer.android.com/reference/java/lang/String.html) key) Removes any entry with the given key from the mapping of this `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`. |
| int | [size](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#size())() Returns the number of key-value pairs in this map. |
| [Bundle](https://developer.android.com/reference/android/os/Bundle.html) | [toBundle](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#toBundle())() Returns a `Bundle` containing all the elements on this `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`. |
| byte\[\] | [toByteArray](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#toByteArray())() Returns a serialized `byte[]` representing this `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`. |
| [String](https://developer.android.com/reference/java/lang/String.html) | [toString](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#toString())() |

### Inherited Method Summary

From class java.lang.Object

|---|---|
| [Object](https://developer.android.com/reference/java/lang/Object.html) | clone() |
| boolean | equals([Object](https://developer.android.com/reference/java/lang/Object.html) arg0) |
| void | finalize() |
| final [Class](https://developer.android.com/reference/java/lang/Class.html)\<?\> | getClass() |
| int | hashCode() |
| final void | notify() |
| final void | notifyAll() |
| [String](https://developer.android.com/reference/java/lang/String.html) | toString() |
| final void | wait(long arg0, int arg1) |
| final void | wait(long arg0) |
| final void | wait() |

## Constants

#### public static final [String](https://developer.android.com/reference/java/lang/String.html)
**TAG**

Constant Value: "DataMap"

## Public Constructors

#### public **DataMap** ()

## Public Methods

#### public static [ArrayList](https://developer.android.com/reference/java/util/ArrayList.html)\<[DataMap](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap)\>
**arrayListFromBundleArrayList** ([ArrayList](https://developer.android.com/reference/java/util/ArrayList.html)\<[Bundle](https://developer.android.com/reference/android/os/Bundle.html)\> bundleArrayList)

Returns an `ArrayList` of `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`s
from an `ArrayList` of `Bundle`s. Any elements in the
`Bundle`s not supported by `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`
will be dropped.

##### Returns

- an `ArrayList` of `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`s

#### public void **clear** ()

Removes all elements from the mapping of this `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`.

#### public boolean **containsKey** ([String](https://developer.android.com/reference/java/lang/String.html) key)

Returns true if the given key is contained in the mapping of this `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`.

##### Parameters

| key | a String key |
|---|---|

##### Returns

- true if the key is part of the mapping, false otherwise

#### public boolean **equals** ([Object](https://developer.android.com/reference/java/lang/Object.html) o)

Returns true if the given Object is a `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`
equivalent to this one.

#### public static [DataMap](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap)
**fromBundle** ([Bundle](https://developer.android.com/reference/android/os/Bundle.html) bundle)

Returns a `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`
from a `Bundle`. The input `Bundle` is expected to contain only
elements supported by `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`.
Any elements in the `Bundle` not supported by `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`
will be dropped.

##### Returns

- a `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap` from a `Bundle` object

#### public static [DataMap](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap)
**fromByteArray** (byte\[\] bytes)

Returns a `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`
from a byte\[\].

##### Parameters

| bytes | the bytes of the `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap` to convert |
|---|---|

##### Returns

- a new `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap` out of the input bytes

#### public T **get** ([String](https://developer.android.com/reference/java/lang/String.html) key)

Returns the entry with the given key as an object.

##### Parameters

| key | a String key |
|---|---|

##### Returns

- an Object, or `null`

#### public [Asset](https://developers.google.com/android/reference/com/google/android/gms/wearable/Asset)
**getAsset** ([String](https://developer.android.com/reference/java/lang/String.html) 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 | a String, or `null` |
|---|---|

##### Returns

- an Asset, or `null`

#### public boolean **getBoolean** ([String](https://developer.android.com/reference/java/lang/String.html) 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.

##### Parameters

| key | a String |
| defaultValue | Value to return if key does not exist |
|---|---|

##### Returns

- a boolean value

#### public boolean **getBoolean** ([String](https://developer.android.com/reference/java/lang/String.html) key)

Returns the value associated with the given key, or false if no mapping of the
desired type exists for the given key.

##### Parameters

| key | a String |
|---|---|

##### Returns

- a boolean value

#### public byte **getByte** ([String](https://developer.android.com/reference/java/lang/String.html) key)

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 | a String |
|---|---|

##### Returns

- a byte value

#### public byte **getByte** ([String](https://developer.android.com/reference/java/lang/String.html) key, byte defaultValue)

Returns the value associated with the given key, or defaultValue if no mapping of
the desired type exists for the given key.

##### Parameters

| key | a String |
| defaultValue | Value to return if key does not exist |
|---|---|

##### Returns

- a byte value

#### public byte\[\] **getByteArray** ([String](https://developer.android.com/reference/java/lang/String.html) 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 | a String, or `null` |
|---|---|

##### Returns

- a byte\[\] value, or `null`

#### public [DataMap](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap)
**getDataMap** ([String](https://developer.android.com/reference/java/lang/String.html) 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 | a String, or `null` |
|---|---|

##### Returns

- a DataMap, or `null`

#### public [ArrayList](https://developer.android.com/reference/java/util/ArrayList.html)\<[DataMap](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap)\>
**getDataMapArrayList** ([String](https://developer.android.com/reference/java/lang/String.html) 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 | a String, or `null` |
|---|---|

##### Returns

- an `ArrayList<DataMap>` value, or `null`

#### public double **getDouble** ([String](https://developer.android.com/reference/java/lang/String.html) 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.

##### Parameters

| key | a String |
| defaultValue | Value to return if key does not exist |
|---|---|

##### Returns

- a double value

#### public double **getDouble** ([String](https://developer.android.com/reference/java/lang/String.html) key)

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 | a String |
|---|---|

##### Returns

- a double value

#### public float **getFloat** ([String](https://developer.android.com/reference/java/lang/String.html) 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.

##### Parameters

| key | a String |
| defaultValue | Value to return if key does not exist |
|---|---|

##### Returns

- a float value

#### public float **getFloat** ([String](https://developer.android.com/reference/java/lang/String.html) key)

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 | a String |
|---|---|

##### Returns

- a float value

#### public float\[\] **getFloatArray** ([String](https://developer.android.com/reference/java/lang/String.html) 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 | a String, or `null` |
|---|---|

##### Returns

- a float\[\] value, or `null`

#### public int **getInt** ([String](https://developer.android.com/reference/java/lang/String.html) 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.

##### Parameters

| key | a String |
| defaultValue | Value to return if key does not exist |
|---|---|

##### Returns

- an int value

#### public int **getInt** ([String](https://developer.android.com/reference/java/lang/String.html) key)

Returns the value associated with the given key, or 0 if no mapping of the desired
type exists for the given key.

##### Parameters

| key | a String |
|---|---|

##### Returns

- an int value

#### public [ArrayList](https://developer.android.com/reference/java/util/ArrayList.html)\<[Integer](https://developer.android.com/reference/java/lang/Integer.html)\>
**getIntegerArrayList** ([String](https://developer.android.com/reference/java/lang/String.html) 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 | a String, or `null` |
|---|---|

##### Returns

- an `ArrayList<String>` value, or `null`

#### public long **getLong** ([String](https://developer.android.com/reference/java/lang/String.html) 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.

##### Parameters

| key | a String |
| defaultValue | Value to return if key does not exist |
|---|---|

##### Returns

- a long value

#### public long **getLong** ([String](https://developer.android.com/reference/java/lang/String.html) key)

Returns the value associated with the given key, or 0L if no mapping of the desired
type exists for the given key.

##### Parameters

| key | a String |
|---|---|

##### Returns

- a long value

#### public long\[\] **getLongArray** ([String](https://developer.android.com/reference/java/lang/String.html) 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 | a String, or `null` |
|---|---|

##### Returns

- a long\[\] value, or `null`

#### public [String](https://developer.android.com/reference/java/lang/String.html) **getString** ([String](https://developer.android.com/reference/java/lang/String.html) 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 | a String, or `null` |
|---|---|

##### Returns

- a String value, or `null`

#### public [String](https://developer.android.com/reference/java/lang/String.html) **getString** ([String](https://developer.android.com/reference/java/lang/String.html) key, [String](https://developer.android.com/reference/java/lang/String.html) defaultValue)

Returns the value associated with the given key, or defaultValue if no mapping of
the desired type exists for the given key.

##### Parameters

| key | a String, or `null` |
| defaultValue | Value to return if key does not exist |
|---|---|

##### Returns

- the String value associated with the given key, or defaultValue if no valid String object is currently mapped to that key.

#### public [String\[\]](https://developer.android.com/reference/java/lang/String.html) **getStringArray** ([String](https://developer.android.com/reference/java/lang/String.html) 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 | a String, or `null` |
|---|---|

##### Returns

- a String\[\] value, or `null`

#### public [ArrayList](https://developer.android.com/reference/java/util/ArrayList.html)\<[String](https://developer.android.com/reference/java/lang/String.html)\>
**getStringArrayList** ([String](https://developer.android.com/reference/java/lang/String.html) 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 | a String, or `null` |
|---|---|

##### Returns

- an `ArrayList<String>` value, or `null`

#### public int **hashCode** ()

#### public boolean **isEmpty** ()

Returns true if the mapping of this `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap` is
empty, false otherwise.

#### public [Set](https://developer.android.com/reference/java/util/Set.html)\<[String](https://developer.android.com/reference/java/lang/String.html)\>
**keySet** ()

Returns a Set containing the Strings used as keys in this `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`.

##### Returns

- a Set of String keys

#### public void **putAll** ([DataMap](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap) dataMap)

Inserts all mappings from the given `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`
into this `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`.

##### Parameters

| dataMap | a `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap` |
|---|---|

#### public void **putAsset** ([String](https://developer.android.com/reference/java/lang/String.html) key, [Asset](https://developers.google.com/android/reference/com/google/android/gms/wearable/Asset) value)

Inserts an `https://developers.google.com/android/reference/com/google/android/gms/wearable/Asset` into
the mapping of this `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`,
replacing any existing `https://developers.google.com/android/reference/com/google/android/gms/wearable/Asset` for
the given key. Either key or value may be `null`.

##### Parameters

| key | a String, or `null` |
| value | an Asset, or `null` |
|---|---|

#### public void **putBoolean** ([String](https://developer.android.com/reference/java/lang/String.html) key, boolean value)

Inserts a boolean value into the mapping of this `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`,
replacing any existing value for the given key.

##### Parameters

| key | a String, or null |
| value | a boolean |
|---|---|

#### public void **putByte** ([String](https://developer.android.com/reference/java/lang/String.html) key, byte value)

Inserts a byte value into the mapping of this `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`,
replacing any existing value for the given key.

##### Parameters

| key | a String, or `null` |
| value | a byte |
|---|---|

#### public void **putByteArray** ([String](https://developer.android.com/reference/java/lang/String.html) key, byte\[\] value)

Inserts a byte array value into the mapping of this `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`,
replacing any existing value for the given key. Either key or value may be
`null`.

##### Parameters

| key | a String, or `null` |
| value | a byte array object, or `null` |
|---|---|

#### public void **putDataMap** ([String](https://developer.android.com/reference/java/lang/String.html) key, [DataMap](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap) value)

Inserts a `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`
into the mapping of this `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`,
replacing any existing `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`
for the given key. Either key or value may be `null`.

##### Parameters

| key | a String, or `null` |
| value | a `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`, or `null` |
|---|---|

#### public void **putDataMapArrayList** ([String](https://developer.android.com/reference/java/lang/String.html) key, [ArrayList](https://developer.android.com/reference/java/util/ArrayList.html)\<[DataMap](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap)\> value)

Inserts an `ArrayList<DataMap>` value into the mapping of this
`https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`,
replacing any existing value for the given key. Either key or value may be
`null`.

##### Parameters

| key | a String, or `null` |
| value | an `ArrayList<DataMap>` object, or `null` |
|---|---|

#### public void **putDouble** ([String](https://developer.android.com/reference/java/lang/String.html) key, double value)

Inserts a double value into the mapping of this `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`,
replacing any existing value for the given key.

##### Parameters

| key | a String, or `null` |
| value | a double |
|---|---|

#### public void **putFloat** ([String](https://developer.android.com/reference/java/lang/String.html) key, float value)

Inserts a float value into the mapping of this `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`,
replacing any existing value for the given key.

##### Parameters

| key | a String, or `null` |
| value | a float |
|---|---|

#### public void **putFloatArray** ([String](https://developer.android.com/reference/java/lang/String.html) key, float\[\] value)

Inserts a float array value into the mapping of this `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`,
replacing any existing value for the given key. Either key or value may be
`null`.

##### Parameters

| key | a String, or `null` |
| value | a float array object, or `null` |
|---|---|

#### public void **putInt** ([String](https://developer.android.com/reference/java/lang/String.html) key, int value)

Inserts an int value into the mapping of this `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`,
replacing any existing value for the given key.

##### Parameters

| key | a String, or `null` |
| value | an int |
|---|---|

#### public void **putIntegerArrayList** ([String](https://developer.android.com/reference/java/lang/String.html) key, [ArrayList](https://developer.android.com/reference/java/util/ArrayList.html)\<[Integer](https://developer.android.com/reference/java/lang/Integer.html)\> value)

Inserts an `ArrayList<Integer>` value into the mapping of this
`https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`,
replacing any existing value for the given key. Either key or value may be
`null`.

##### Parameters

| key | a String, or `null` |
| value | an `ArrayList<Integer>` object, or `null` |
|---|---|

#### public void **putLong** ([String](https://developer.android.com/reference/java/lang/String.html) key, long value)

Inserts a long value into the mapping of this `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`,
replacing any existing value for the given key.

##### Parameters

| key | a String, or `null` |
| value | a long |
|---|---|

#### public void **putLongArray** ([String](https://developer.android.com/reference/java/lang/String.html) key, long\[\] value)

Inserts a long array value into the mapping of this `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`,
replacing any existing value for the given key. Either key or value may be
`null`.

##### Parameters

| key | a String, or `null` |
| value | a long array object, or `null` |
|---|---|

#### public void **putString** ([String](https://developer.android.com/reference/java/lang/String.html) key, [String](https://developer.android.com/reference/java/lang/String.html) value)

Inserts a String value into the mapping of this `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`,
replacing any existing value for the given key. Either key or value may be
`null`.

##### Parameters

| key | a String, or `null` |
| value | a String, or `null` |
|---|---|

#### public void **putStringArray** ([String](https://developer.android.com/reference/java/lang/String.html) key, [String\[\]](https://developer.android.com/reference/java/lang/String.html) value)

Inserts a String array value into the mapping of this `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`,
replacing any existing value for the given key. Either key or value may be
`null`.

##### Parameters

| key | a String, or `null` |
| value | a String array object, or `null` |
|---|---|

#### public void **putStringArrayList** ([String](https://developer.android.com/reference/java/lang/String.html) key, [ArrayList](https://developer.android.com/reference/java/util/ArrayList.html)\<[String](https://developer.android.com/reference/java/lang/String.html)\> value)

Inserts an `ArrayList<String>` value into the mapping of this
`https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`,
replacing any existing value for the given key. Either key or value may be
`null`.

##### Parameters

| key | a String, or `null` |
| value | an `ArrayList<String>` object, or `null` |
|---|---|

#### public [Object](https://developer.android.com/reference/java/lang/Object.html) **remove** ([String](https://developer.android.com/reference/java/lang/String.html) key)

Removes any entry with the given key from the mapping of this `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`.

##### Parameters

| key | a String key |
|---|---|

#### public int **size** ()

Returns the number of key-value pairs in this map.

#### public [Bundle](https://developer.android.com/reference/android/os/Bundle.html) **toBundle** ()

Returns a `Bundle` containing all the elements on this `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`. A
data map converted in this way should only be read after converting it with
`https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap#fromBundle(android.os.Bundle)`.

##### Returns

- a `Bundle` containing all supported elements on this `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`.

#### public byte\[\] **toByteArray** ()

Returns a serialized `byte[]` representing this `https://developers.google.com/android/reference/com/google/android/gms/wearable/DataMap`.

#### public [String](https://developer.android.com/reference/java/lang/String.html) **toString** ()