java.lang.Object | ||
↳ | android.os.BaseBundle | |
↳ | android.os.Bundle |
A mapping from String values to various Parcelable types.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
android.os.Parcelable
|
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
CREATOR | |||||||||||
EMPTY |
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.
| |||||||||||
Constructs a Bundle containing a copy of the mappings from the given
PersistableBundle.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Removes all elements from the mapping of this Bundle.
| |||||||||||
Clones the current Bundle.
| |||||||||||
Report the nature of this Parcelable's contents
| |||||||||||
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 (byte) 0 if
no mapping of the desired type exists for the given key.
| |||||||||||
Returns the value associated with the given key, or defaultValue if
no mapping of the desired type exists for the given key.
| |||||||||||
Returns the value associated with the given key, or null if
no mapping of the desired type exists for the given key or a null
value is explicitly associated with the key.
| |||||||||||
Returns the value associated with the given key, or (char) 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 defaultValue if
no mapping of the desired type exists for the given key or if a null
value is explicitly associatd with 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.
| |||||||||||
Return the ClassLoader currently associated with this Bundle.
| |||||||||||
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 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.
| |||||||||||
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.
| |||||||||||
Inserts all mappings from the given Bundle into this Bundle.
| |||||||||||
Inserts an
IBinder 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 CharSequence array value into the mapping of this Bundle, replacing
any existing value for the given key.
| |||||||||||
Inserts an ArrayList
| |||||||||||
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 ArrayList
| |||||||||||
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 Size value into the mapping of this Bundle, replacing
any existing value for the given key.
| |||||||||||
Inserts a SizeF 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 an ArrayList
| |||||||||||
Reads the Parcel contents into this Bundle, typically in order for
it to be passed through an IBinder connection.
| |||||||||||
Changes the ClassLoader this Bundle uses when instantiating objects.
| |||||||||||
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
android.os.BaseBundle
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
android.os.Parcelable
|
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. |
---|
Constructs a Bundle containing a copy of the mappings from the given PersistableBundle.
b | a Bundle to be copied. |
---|
Clones the current Bundle. The internal map is cloned, but the keys and values to which it refers are copied by reference.
Report the nature of this Parcelable's contents
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 (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 defaultValue if no mapping of the desired type exists for the given key.
key | a String |
---|---|
defaultValue | Value to return if key does not exist |
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 defaultValue if no mapping of the desired type exists for the given key.
key | a String |
---|---|
defaultValue | Value to return if key does not exist |
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 or if a null value is explicitly associatd with the given key.
key | a String, or null |
---|---|
defaultValue | Value to return if key does not exist or if a null value is associated with 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.
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 |
---|
Return the ClassLoader currently associated with this Bundle.
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 defaultValue if no mapping of the desired type exists for the given key.
key | a String |
---|---|
defaultValue | Value to return if key does not exist |
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 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 |
---|---|
defaultValue | Value to return if key does not exist |
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.
Inserts all mappings from the given Bundle into this Bundle.
bundle | a Bundle |
---|
Inserts an IBinder
value into the mapping of this Bundle, replacing
any existing value for the given key. Either key or value may be null.
You should be very careful when using this function. In many places where Bundles are used (such as inside of Intent objects), the Bundle can live longer inside of another process than the process that had originally created it. In that case, the IBinder you supply here will become invalid when your process goes away, and no longer usable, even if a new process is created for you later on.
key | a String, or null |
---|---|
value | an IBinder 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 CharSequence 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 CharSequence array object, or null |
Inserts an ArrayList
key | a String, or null |
---|---|
value | an ArrayList |
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 ArrayList
key | a String, or null |
---|---|
value | an ArrayList |
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 Size 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 Size object, or null |
Inserts a SizeF 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 SizeF 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 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. |
---|
Changes the ClassLoader this Bundle uses when instantiating objects.
loader | An explicit ClassLoader to use when instantiating objects inside of the 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 is equivalent to the following expression:
getClass().getName() + '@' + Integer.toHexString(hashCode())
See Writing a useful
toString
method
if you intend implementing your own toString
method.
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 .
|