java.lang.Object | |
↳ | android.os.Bundle |
A mapping from String values to various Parcelable types.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creator<Bundle> | CREATOR | ||||||||||
Bundle | EMPTY |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
android.os.Parcelable
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new, empty Bundle.
| |||||||||||
Constructs a new, empty Bundle that uses a specific ClassLoader for
instantiating Parcelable and Serializable objects.
| |||||||||||
Constructs a new, empty Bundle sized to hold the given number of
elements.
| |||||||||||
Constructs a Bundle containing a copy of the mappings from the given
Bundle.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Removes all elements from the mapping of this Bundle.
| |||||||||||
Clones the current Bundle.
| |||||||||||
Returns true if the given key is contained in the mapping
of this Bundle.
| |||||||||||
Report the nature of this Parcelable's contents
| |||||||||||
Returns the entry with the given key as an object.
| |||||||||||
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 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 defaultValue 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 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 (char) 0 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 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 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.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 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 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 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 (short) 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 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.
| |||||||||||
Reports whether the bundle contains any parcelled file descriptors.
| |||||||||||
Returns true if the mapping of this Bundle is empty, false otherwise.
| |||||||||||
Returns a Set containing the Strings used as keys in this Bundle.
| |||||||||||
Inserts all mappings from the given Bundle into this Bundle.
| |||||||||||
Inserts a Boolean value into the mapping of this Bundle, replacing
any existing value for the given key.
| |||||||||||
Inserts a boolean array value into the mapping of this Bundle, replacing
any existing value for the given key.
| |||||||||||
Inserts a Bundle value into the mapping of this Bundle, replacing
any existing value for the given key.
| |||||||||||
Inserts a byte value into the mapping of this Bundle, replacing
any existing value for the given key.
| |||||||||||
Inserts a byte array value into the mapping of this Bundle, replacing
any existing value for the given key.
| |||||||||||
Inserts a char value into the mapping of this Bundle, replacing
any existing value for the given key.
| |||||||||||
Inserts a char array value into the mapping of this Bundle, replacing
any existing value for the given key.
| |||||||||||
Inserts a CharSequence value into the mapping of this Bundle, replacing
any existing value for the given key.
| |||||||||||
Inserts a double value into the mapping of this Bundle, replacing
any existing value for the given key.
| |||||||||||
Inserts a double array value into the mapping of this Bundle, replacing
any existing value for the given key.
| |||||||||||
Inserts a float value into the mapping of this Bundle, replacing
any existing value for the given key.
| |||||||||||
Inserts a float array value into the mapping of this Bundle, replacing
any existing value for the given key.
| |||||||||||
Inserts an int value into the mapping of this Bundle, replacing
any existing value for the given key.
| |||||||||||
Inserts an int array value into the mapping of this Bundle, replacing
any existing value for the given key.
| |||||||||||
Inserts an ArrayList
| |||||||||||
Inserts a long value into the mapping of this Bundle, replacing
any existing value for the given key.
| |||||||||||
Inserts a long array value into the mapping of this Bundle, replacing
any existing value for the given key.
| |||||||||||
Inserts a Parcelable value into the mapping of this Bundle, replacing
any existing value for the given key.
| |||||||||||
Inserts an array of Parcelable values into the mapping of this Bundle,
replacing any existing value for the given key.
| |||||||||||
Inserts a List of Parcelable values into the mapping of this Bundle,
replacing any existing value for the given key.
| |||||||||||
Inserts a Serializable value into the mapping of this Bundle, replacing
any existing value for the given key.
| |||||||||||
Inserts a short value into the mapping of this Bundle, replacing
any existing value for the given key.
| |||||||||||
Inserts a short array value into the mapping of this Bundle, replacing
any existing value for the given key.
| |||||||||||
Inserts a SparceArray of Parcelable values into the mapping of this
Bundle, replacing any existing value for the given key.
| |||||||||||
Inserts a String value into the mapping of this Bundle, replacing
any existing value for the given key.
| |||||||||||
Inserts a String array value into the mapping of this Bundle, replacing
any existing value for the given key.
| |||||||||||
Inserts an ArrayList
| |||||||||||
Reads the Parcel contents into this Bundle, typically in order for
it to be passed through an IBinder connection.
| |||||||||||
Removes any entry with the given key from the mapping of this Bundle.
| |||||||||||
Changes the ClassLoader this Bundle uses when instantiating objects.
| |||||||||||
Returns the number of mappings contained in this Bundle.
| |||||||||||
Returns a string containing a concise, human-readable description of this
object.
| |||||||||||
Writes the Bundle contents to a Parcel, typically in order for
it to be passed through an IBinder connection.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class java.lang.Object
| |||||||||||
From interface android.os.Parcelable
|
Constructs a new, empty Bundle.
Constructs a new, empty Bundle that uses a specific ClassLoader for instantiating Parcelable and Serializable objects.
loader | An explicit ClassLoader to use when instantiating objects inside of the Bundle. |
---|
Constructs a new, empty Bundle sized to hold the given number of elements. The Bundle will grow as needed.
capacity | the initial capacity of the Bundle |
---|
Constructs a Bundle containing a copy of the mappings from the given Bundle.
b | a Bundle to be copied. |
---|
Removes all elements from the mapping of this Bundle.
Clones the current Bundle. The internal map is cloned, but the keys and values to which it refers are copied by reference.
Returns true if the given key is contained in the mapping of this Bundle.
key | a String key |
---|
Report the nature of this Parcelable's contents
Returns the entry with the given key as an object.
key | a String key |
---|
Returns the value associated with the given key, or false if no mapping of the desired type exists for the given key.
key | a String |
---|
Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
key | a String |
---|
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.
key | a String, 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.
key | a String, or null |
---|
Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
key | a String |
---|
Returns the value associated with the given key, or (byte) 0 if no mapping of the desired type exists for the given key.
key | a String |
---|
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.
key | a String, or null |
---|
Returns the value associated with the given key, or (char) 0 if no mapping of the desired type exists for the given key.
key | a String |
---|
Returns the value associated with the given key, or false if no mapping of the desired type exists for the given key.
key | a String |
---|
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.
key | a String, 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.
key | a String, or null |
---|
Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
key | a String |
---|
Returns the value associated with the given key, or 0.0 if no mapping of the desired type exists for the given key.
key | a String |
---|
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.
key | a String, or null |
---|
Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
key | a String |
---|
Returns the value associated with the given key, or 0.0f if no mapping of the desired type exists for the given key.
key | a String |
---|
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.
key | a String, or null |
---|
Returns the value associated with the given key, or 0 if no mapping of the desired type exists for the given key.
key | a String |
---|
Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
key | a String |
---|
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.
key | a String, 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.
key | a String, or null |
---|
Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
key | a String |
---|
Returns the value associated with the given key, or 0L if no mapping of the desired type exists for the given key.
key | a String |
---|
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.
key | a String, 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.
key | a String, 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.
key | a String, 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.
key | a String, 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.
key | a String, or null |
---|
Returns the value associated with the given key, or (short) 0 if no mapping of the desired type exists for the given key.
key | a String |
---|
Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
key | a String |
---|
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.
key | a String, 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.
key | a String, 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.
key | a String, 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.
key | a String, 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.
key | a String, or null |
---|
Reports whether the bundle contains any parcelled file descriptors.
Returns true if the mapping of this Bundle is empty, false otherwise.
Returns a Set containing the Strings used as keys in this Bundle.
Inserts all mappings from the given Bundle into this Bundle.
map | a Bundle |
---|
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.
key | a String, or null |
---|---|
value | a Boolean, or null |
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.
key | a String, or null |
---|---|
value | a boolean array object, or null |
Inserts a Bundle value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.
key | a String, or null |
---|---|
value | a Bundle object, or null |
Inserts a byte value into the mapping of this Bundle, replacing any existing value for the given key.
key | a String, or null |
---|---|
value | a byte |
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.
key | a String, or null |
---|---|
value | a byte array object, or null |
Inserts a char value into the mapping of this Bundle, replacing any existing value for the given key.
key | a String, or null |
---|---|
value | a char, or null |
Inserts a char array value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.
key | a String, or null |
---|---|
value | a char array object, or null |
Inserts a CharSequence value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.
key | a String, or null |
---|---|
value | a CharSequence, or null |
Inserts a double value into the mapping of this Bundle, replacing any existing value for the given key.
key | a String, or null |
---|---|
value | a double |
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.
key | a String, or null |
---|---|
value | a double array object, or null |
Inserts a float value into the mapping of this Bundle, replacing any existing value for the given key.
key | a String, or null |
---|---|
value | a float |
Inserts a float array value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.
key | a String, or null |
---|---|
value | a float array object, or null |
Inserts an int value into the mapping of this Bundle, replacing any existing value for the given key.
key | a String, or null |
---|---|
value | an int, or null |
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.
key | a String, or null |
---|---|
value | an int array object, or null |
Inserts an ArrayList
key | a String, or null |
---|---|
value | an ArrayList |
Inserts a long value into the mapping of this Bundle, replacing any existing value for the given key.
key | a String, or null |
---|---|
value | a long |
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.
key | a String, or null |
---|---|
value | a long array object, or null |
Inserts a Parcelable value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.
key | a String, or null |
---|---|
value | a Parcelable object, or null |
Inserts an array of Parcelable values into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.
key | a String, or null |
---|---|
value | an array of Parcelable objects, or null |
Inserts a List of Parcelable values into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.
key | a String, or null |
---|---|
value | an ArrayList of Parcelable objects, or null |
Inserts a Serializable value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.
key | a String, or null |
---|---|
value | a Serializable object, or null |
Inserts a short value into the mapping of this Bundle, replacing any existing value for the given key.
key | a String, or null |
---|---|
value | a short |
Inserts a short array value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.
key | a String, or null |
---|---|
value | a short array object, or null |
Inserts a SparceArray of Parcelable values into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.
key | a String, or null |
---|---|
value | a SparseArray of Parcelable objects, or null |
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.
key | a String, or null |
---|---|
value | a String, or null |
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.
key | a String, or null |
---|---|
value | a String array object, or null |
Inserts an ArrayList
key | a String, or null |
---|---|
value | an ArrayList |
Reads the Parcel contents into this Bundle, typically in order for it to be passed through an IBinder connection.
parcel | The parcel to overwrite this bundle from. |
---|
Removes any entry with the given key from the mapping of this Bundle.
key | a String key |
---|
Changes the ClassLoader this Bundle uses when instantiating objects.
loader | An explicit ClassLoader to use when instantiating objects inside of the Bundle. |
---|
Returns the number of mappings contained in this Bundle.
Returns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation simply concatenates the class name, the '@' sign and a hexadecimal representation of the object's hashCode(), that is, it is equivalent to the following expression:
getClass().getName() + '@' + Integer.toHexString(hashCode())
Writes the Bundle contents to a Parcel, typically in order for it to be passed through an IBinder connection.
parcel | The parcel to copy this bundle to. |
---|---|
flags | Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. |