Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Methods](https://developer.android.com/reference/android/os/BaseBundle#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/os/BaseBundle#inhmethods)

# BaseBundle

*** ** * ** ***

` public class BaseBundle `   
` extends https://developer.android.com/reference/java/lang/Object ` ` `

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.os.BaseBundle |

Known direct subclasses [Bundle](https://developer.android.com/reference/android/os/Bundle), [PersistableBundle](https://developer.android.com/reference/android/os/PersistableBundle) [Bundle](https://developer.android.com/reference/android/os/Bundle) A mapping from String keys to various `https://developer.android.com/reference/android/os/Parcelable` values. [PersistableBundle](https://developer.android.com/reference/android/os/PersistableBundle) A mapping from String keys to values of various types.   

*** ** * ** ***

A mapping from String keys to values of various types. In most cases, you should work directly with either the `https://developer.android.com/reference/android/os/Bundle` or `https://developer.android.com/reference/android/os/PersistableBundle` subclass.

## Summary

| ### Public methods ||
|---|---|
| ` void` | ` https://developer.android.com/reference/android/os/BaseBundle#clear()() ` Removes all elements from the mapping of this Bundle. |
| ` boolean` | ` https://developer.android.com/reference/android/os/BaseBundle#containsKey(java.lang.String)(https://developer.android.com/reference/java/lang/String key) ` Returns true if the given key is contained in the mapping of this Bundle. |
| ` https://developer.android.com/reference/java/lang/Object` | ` https://developer.android.com/reference/android/os/BaseBundle#get(java.lang.String)(https://developer.android.com/reference/java/lang/String key) ` *This method was deprecated in API level 33. Use the type-safe specific APIs depending on the type of the item to be retrieved, eg. `https://developer.android.com/reference/android/os/BaseBundle#getString(java.lang.String)`.* |
| ` boolean` | ` https://developer.android.com/reference/android/os/BaseBundle#getBoolean(java.lang.String,%20boolean)(https://developer.android.com/reference/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. |
| ` boolean` | ` https://developer.android.com/reference/android/os/BaseBundle#getBoolean(java.lang.String)(https://developer.android.com/reference/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[]` | ` https://developer.android.com/reference/android/os/BaseBundle#getBooleanArray(java.lang.String)(https://developer.android.com/reference/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. |
| ` byte[]` | ` https://developer.android.com/reference/android/os/BaseBundle#getByteArray(java.lang.String)(https://developer.android.com/reference/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. |
| ` double` | ` https://developer.android.com/reference/android/os/BaseBundle#getDouble(java.lang.String,%20double)(https://developer.android.com/reference/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. |
| ` double` | ` https://developer.android.com/reference/android/os/BaseBundle#getDouble(java.lang.String)(https://developer.android.com/reference/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[]` | ` https://developer.android.com/reference/android/os/BaseBundle#getDoubleArray(java.lang.String)(https://developer.android.com/reference/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` | ` https://developer.android.com/reference/android/os/BaseBundle#getInt(java.lang.String)(https://developer.android.com/reference/java/lang/String key) ` Returns the value associated with the given key, or 0 if no mapping of the desired type exists for the given key. |
| ` int` | ` https://developer.android.com/reference/android/os/BaseBundle#getInt(java.lang.String,%20int)(https://developer.android.com/reference/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. |
| ` int[]` | ` https://developer.android.com/reference/android/os/BaseBundle#getIntArray(java.lang.String)(https://developer.android.com/reference/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. |
| ` long` | ` https://developer.android.com/reference/android/os/BaseBundle#getLong(java.lang.String)(https://developer.android.com/reference/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` | ` https://developer.android.com/reference/android/os/BaseBundle#getLong(java.lang.String,%20long)(https://developer.android.com/reference/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. |
| ` long[]` | ` https://developer.android.com/reference/android/os/BaseBundle#getLongArray(java.lang.String)(https://developer.android.com/reference/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. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/os/BaseBundle#getString(java.lang.String)(https://developer.android.com/reference/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. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/os/BaseBundle#getString(java.lang.String,%20java.lang.String)(https://developer.android.com/reference/java/lang/String key, https://developer.android.com/reference/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. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/os/BaseBundle#getStringArray(java.lang.String)(https://developer.android.com/reference/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` | ` https://developer.android.com/reference/android/os/BaseBundle#isEmpty()() ` Returns true if the mapping of this Bundle is empty, false otherwise. |
| ` https://developer.android.com/reference/java/util/Set<https://developer.android.com/reference/java/lang/String>` | ` https://developer.android.com/reference/android/os/BaseBundle#keySet()() ` Returns a Set containing the Strings used as keys in this Bundle. |
| ` void` | ` https://developer.android.com/reference/android/os/BaseBundle#putAll(android.os.PersistableBundle)(https://developer.android.com/reference/android/os/PersistableBundle bundle) ` Inserts all mappings from the given PersistableBundle into this BaseBundle. |
| ` void` | ` https://developer.android.com/reference/android/os/BaseBundle#putBoolean(java.lang.String,%20boolean)(https://developer.android.com/reference/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` | ` https://developer.android.com/reference/android/os/BaseBundle#putBooleanArray(java.lang.String,%20boolean[])(https://developer.android.com/reference/java/lang/String key, boolean[] value) ` Inserts a boolean array value into the mapping of this Bundle, replacing any existing value for the given key. |
| ` void` | ` https://developer.android.com/reference/android/os/BaseBundle#putByteArray(java.lang.String,%20byte[])(https://developer.android.com/reference/java/lang/String key, byte[] value) ` Inserts a byte array value into the mapping of this Bundle, replacing any existing value for the given key. |
| ` void` | ` https://developer.android.com/reference/android/os/BaseBundle#putDouble(java.lang.String,%20double)(https://developer.android.com/reference/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` | ` https://developer.android.com/reference/android/os/BaseBundle#putDoubleArray(java.lang.String,%20double[])(https://developer.android.com/reference/java/lang/String key, double[] value) ` Inserts a double array value into the mapping of this Bundle, replacing any existing value for the given key. |
| ` void` | ` https://developer.android.com/reference/android/os/BaseBundle#putInt(java.lang.String,%20int)(https://developer.android.com/reference/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` | ` https://developer.android.com/reference/android/os/BaseBundle#putIntArray(java.lang.String,%20int[])(https://developer.android.com/reference/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` | ` https://developer.android.com/reference/android/os/BaseBundle#putLong(java.lang.String,%20long)(https://developer.android.com/reference/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` | ` https://developer.android.com/reference/android/os/BaseBundle#putLongArray(java.lang.String,%20long[])(https://developer.android.com/reference/java/lang/String key, long[] value) ` Inserts a long array value into the mapping of this Bundle, replacing any existing value for the given key. |
| ` void` | ` https://developer.android.com/reference/android/os/BaseBundle#putString(java.lang.String,%20java.lang.String)(https://developer.android.com/reference/java/lang/String key, https://developer.android.com/reference/java/lang/String value) ` Inserts a String value into the mapping of this Bundle, replacing any existing value for the given key. |
| ` void` | ` https://developer.android.com/reference/android/os/BaseBundle#putStringArray(java.lang.String,%20java.lang.String[])(https://developer.android.com/reference/java/lang/String key, https://developer.android.com/reference/java/lang/String value) ` Inserts a String array value into the mapping of this Bundle, replacing any existing value for the given key. |
| ` void` | ` https://developer.android.com/reference/android/os/BaseBundle#remove(java.lang.String)(https://developer.android.com/reference/java/lang/String key) ` Removes any entry with the given key from the mapping of this Bundle. |
| ` int` | ` https://developer.android.com/reference/android/os/BaseBundle#size()() ` Returns the number of mappings contained in this Bundle. |

### Inherited methods

From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.

## Public methods

### clear

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void clear ()
```

Removes all elements from the mapping of this Bundle. Recycles the underlying parcel if it is still present.

<br />

### containsKey

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean containsKey (String key)
```

Returns true if the given key is contained in the mapping of this Bundle.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String key <br /> |

| Returns ||
|---|---|
| `boolean` | true if the key is part of the mapping, false otherwise <br /> |

### get

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Object get (String key)
```

<br />

**This method was deprecated in API level 33.**   

Use the type-safe specific APIs depending on the type of the item to be retrieved, eg. `https://developer.android.com/reference/android/os/BaseBundle#getString(java.lang.String)`.

Returns the entry with the given key as an object.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String key <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/Object` | an Object, or null <br /> |

### getBoolean

Added in [API level 22](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean getBoolean (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.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String <br /> |
| `defaultValue` | `boolean`: Value to return if key does not exist <br /> |

| Returns ||
|---|---|
| `boolean` | a boolean value <br /> |

### getBoolean

Added in [API level 22](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean getBoolean (String key)
```

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

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String <br /> |

| Returns ||
|---|---|
| `boolean` | a boolean value <br /> |

### getBooleanArray

Added in [API level 22](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean[] getBooleanArray (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.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |

| Returns ||
|---|---|
| `boolean[]` | a boolean\[\] value, or null <br /> |

### getByteArray

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public byte[] getByteArray (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.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |

| Returns ||
|---|---|
| `byte[]` | a byte\[\] value, or null <br /> |

### getDouble

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public double getDouble (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.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String <br /> |
| `defaultValue` | `double`: Value to return if key does not exist <br /> |

| Returns ||
|---|---|
| `double` | a double value <br /> |

### getDouble

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public double getDouble (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.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String <br /> |

| Returns ||
|---|---|
| `double` | a double value <br /> |

### getDoubleArray

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public double[] getDoubleArray (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.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |

| Returns ||
|---|---|
| `double[]` | a double\[\] value, or null <br /> |

### getInt

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getInt (String key)
```

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

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String <br /> |

| Returns ||
|---|---|
| `int` | an int value <br /> |

### getInt

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getInt (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.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String <br /> |
| `defaultValue` | `int`: Value to return if key does not exist <br /> |

| Returns ||
|---|---|
| `int` | an int value <br /> |

### getIntArray

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int[] getIntArray (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.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |

| Returns ||
|---|---|
| `int[]` | an int\[\] value, or null <br /> |

### getLong

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public long getLong (String key)
```

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

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String <br /> |

| Returns ||
|---|---|
| `long` | a long value <br /> |

### getLong

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public long getLong (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.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String <br /> |
| `defaultValue` | `long`: Value to return if key does not exist <br /> |

| Returns ||
|---|---|
| `long` | a long value <br /> |

### getLongArray

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public long[] getLongArray (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.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |

| Returns ||
|---|---|
| `long[]` | a long\[\] value, or null <br /> |

### getString

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String getString (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.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | a String value, or null <br /> |

### getString

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String getString (String key, 
                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.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |
| `defaultValue` | `String`: Value to return if key does not exist or if a null value is associated with the given key. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | the String value associated with the given key, or defaultValue if no valid String object is currently mapped to that key. <br /> |

### getStringArray

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String[] getStringArray (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.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | a String\[\] value, or null <br /> |

### isEmpty

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isEmpty ()
```

Returns true if the mapping of this Bundle is empty, false otherwise.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### keySet

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Set<String> keySet ()
```

Returns a Set containing the Strings used as keys in this Bundle.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/Set<https://developer.android.com/reference/java/lang/String>` | a Set of String keys <br /> |

### putAll

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void putAll (PersistableBundle bundle)
```

Inserts all mappings from the given PersistableBundle into this BaseBundle.

<br />

| Parameters ||
|---|---|
| `bundle` | `PersistableBundle`: a PersistableBundle <br /> |

### putBoolean

Added in [API level 22](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void putBoolean (String key, 
                boolean value)
```

Inserts a Boolean value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |
| `value` | `boolean`: a boolean <br /> |

### putBooleanArray

Added in [API level 22](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void putBooleanArray (String key, 
                boolean[] value)
```

Inserts a boolean array value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |
| `value` | `boolean`: a boolean array object, or null <br /> |

### putByteArray

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void putByteArray (String key, 
                byte[] value)
```

Inserts a byte array value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |
| `value` | `byte`: a byte array object, or null <br /> |

### putDouble

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void putDouble (String key, 
                double value)
```

Inserts a double value into the mapping of this Bundle, replacing any existing value for the given key.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |
| `value` | `double`: a double <br /> |

### putDoubleArray

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void putDoubleArray (String key, 
                double[] value)
```

Inserts a double array value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |
| `value` | `double`: a double array object, or null <br /> |

### putInt

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void putInt (String key, 
                int value)
```

Inserts an int value into the mapping of this Bundle, replacing any existing value for the given key.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |
| `value` | `int`: an int <br /> |

### putIntArray

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void putIntArray (String key, 
                int[] value)
```

Inserts an int array value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |
| `value` | `int`: an int array object, or null <br /> |

### putLong

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void putLong (String key, 
                long value)
```

Inserts a long value into the mapping of this Bundle, replacing any existing value for the given key.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |
| `value` | `long`: a long <br /> |

### putLongArray

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void putLongArray (String key, 
                long[] value)
```

Inserts a long array value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |
| `value` | `long`: a long array object, or null <br /> |

### putString

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void putString (String key, 
                String value)
```

Inserts a String value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |
| `value` | `String`: a String, or null <br /> |

### putStringArray

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void putStringArray (String key, 
                String[] value)
```

Inserts a String array value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |
| `value` | `String`: a String array object, or null <br /> |

### remove

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void remove (String key)
```

Removes any entry with the given key from the mapping of this Bundle.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String key <br /> |

### size

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int size ()
```

Returns the number of mappings contained in this Bundle.

<br />

| Returns ||
|---|---|
| `int` | the number of mappings as an int. <br /> |