Java android.os Bundle fields, constructors, methods, implement or subclass

Example usage for Java android.os Bundle fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for android.os Bundle.

The text is from its open source code.

Field

BundleEMPTY
Parcelable.CreatorCREATOR

Constructor

Bundle()
Constructs a new, empty Bundle.
Bundle(Parcel parcelledData)
Constructs a Bundle whose data is stored as a Parcel.
Bundle(ClassLoader loader)
Constructs a new, empty Bundle that uses a specific ClassLoader for instantiating Parcelable and Serializable objects.
Bundle(int capacity)
Constructs a new, empty Bundle sized to hold the given number of elements.
Bundle(Bundle b)
Constructs a Bundle containing a copy of the mappings from the given Bundle.
Bundle(PersistableBundle b)
Constructs a Bundle containing a copy of the mappings from the given PersistableBundle.
Bundle(boolean doInit)
Constructs a Bundle without initializing it.

Method

voidclear()
Removes all elements from the mapping of this Bundle.
Objectclone()
Clones the current Bundle.
booleancontainsKey(String key)
Returns true if the given key is contained in the mapping of this Bundle.
BundledeepCopy()
Make a deep copy of the given bundle.
booleanequals(Object obj)
Indicates whether some other object is "equal to" this one.
Objectget(String key)
Returns the entry with the given key as an object.
IBindergetBinder(@Nullable 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.
booleangetBoolean(String key)
Returns the value associated with the given key, or false if no mapping of the desired type exists for the given key.
booleangetBoolean(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[]getBooleanArray(@Nullable 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.
BundlegetBundle(@Nullable 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.
BytegetByte(String 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.
bytegetByte(String 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[]getByteArray(@Nullable 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.
chargetChar(String key, char defaultValue)
Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
chargetChar(String key)
Returns the value associated with the given key, or (char) 0 if no mapping of the desired type exists for the given key.
char[]getCharArray(@Nullable 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.
CharSequencegetCharSequence(@Nullable 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.
CharSequencegetCharSequence(@Nullable String key, CharSequence 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 associatd with the given key.
CharSequence[]getCharSequenceArray(@Nullable 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.
doublegetDouble(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.
doublegetDouble(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[]getDoubleArray(@Nullable 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.
floatgetFloat(String 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.
floatgetFloat(String 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(@Nullable 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.
intgetInt(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.
intgetInt(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[]getIntArray(@Nullable 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.
ArrayListgetIntegerArrayList(@Nullable 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.
longgetLong(String key)
Returns the value associated with the given key, or 0L if no mapping of the desired type exists for the given key.
longgetLong(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[]getLongArray(@Nullable 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.
TgetParcelable(@Nullable 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.
Parcelable[]getParcelableArray(@Nullable 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.
ArrayListgetParcelableArrayList(@Nullable 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.
SerializablegetSerializable(@Nullable 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.
shortgetShort(String key)
Returns the value associated with the given key, or (short) 0 if no mapping of the desired type exists for the given key.
shortgetShort(String key, short defaultValue)
Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
short[]getShortArray(@Nullable 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.
SparseArraygetSparseParcelableArray(@Nullable 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.
StringgetString(@Nullable 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.
StringgetString(@Nullable 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.
String[]getStringArray(@Nullable 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.
ArrayListgetStringArrayList(@Nullable 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.
inthashCode()
Returns a hash code value for the object.
booleanisEmpty()
Returns true if the mapping of this Bundle is empty, false otherwise.
SetkeySet()
Returns a Set containing the Strings used as keys in this Bundle.
voidputAll(Bundle bundle)
Inserts all mappings from the given Bundle into this Bundle.
voidputBinder(@Nullable String key, @Nullable IBinder value)
Inserts an IBinder value into the mapping of this Bundle, replacing any existing value for the given key.
voidputBoolean(@Nullable String key, boolean value)
Inserts a Boolean value into the mapping of this Bundle, replacing any existing value for the given key.
voidputBooleanArray(@Nullable String key, @Nullable boolean[] value)
Inserts a boolean array value into the mapping of this Bundle, replacing any existing value for the given key.
voidputBundle(@Nullable String key, @Nullable Bundle value)
Inserts a Bundle value into the mapping of this Bundle, replacing any existing value for the given key.
voidputByte(@Nullable String key, byte value)
Inserts a byte value into the mapping of this Bundle, replacing any existing value for the given key.
voidputByteArray(@Nullable String key, @Nullable byte[] value)
Inserts a byte array value into the mapping of this Bundle, replacing any existing value for the given key.
voidputChar(@Nullable String key, char value)
Inserts a char value into the mapping of this Bundle, replacing any existing value for the given key.
voidputCharArray(@Nullable String key, @Nullable char[] value)
Inserts a char array value into the mapping of this Bundle, replacing any existing value for the given key.
voidputCharSequence(@Nullable String key, @Nullable CharSequence value)
Inserts a CharSequence value into the mapping of this Bundle, replacing any existing value for the given key.
voidputCharSequenceArray(@Nullable String key, @Nullable CharSequence[] value)
Inserts a CharSequence array value into the mapping of this Bundle, replacing any existing value for the given key.
voidputCharSequenceArrayList(@Nullable String key, @Nullable ArrayList value)
Inserts an ArrayList value into the mapping of this Bundle, replacing any existing value for the given key.
voidputDouble(@Nullable String key, double value)
Inserts a double value into the mapping of this Bundle, replacing any existing value for the given key.
voidputDoubleArray(@Nullable String key, @Nullable double[] value)
Inserts a double array value into the mapping of this Bundle, replacing any existing value for the given key.
voidputFloat(@Nullable String key, float value)
Inserts a float value into the mapping of this Bundle, replacing any existing value for the given key.
voidputFloatArray(@Nullable String key, @Nullable float[] value)
Inserts a float array value into the mapping of this Bundle, replacing any existing value for the given key.
voidputInt(@Nullable String key, int value)
Inserts an int value into the mapping of this Bundle, replacing any existing value for the given key.
voidputIntArray(@Nullable String key, @Nullable int[] value)
Inserts an int array value into the mapping of this Bundle, replacing any existing value for the given key.
voidputIntegerArrayList(@Nullable String key, @Nullable ArrayList value)
Inserts an ArrayList value into the mapping of this Bundle, replacing any existing value for the given key.
voidputLong(@Nullable String key, long value)
Inserts a long value into the mapping of this Bundle, replacing any existing value for the given key.
voidputLongArray(@Nullable String key, @Nullable long[] value)
Inserts a long array value into the mapping of this Bundle, replacing any existing value for the given key.
voidputParcelable(@Nullable String key, @Nullable Parcelable value)
Inserts a Parcelable value into the mapping of this Bundle, replacing any existing value for the given key.
voidputParcelableArray(@Nullable String key, @Nullable Parcelable[] value)
Inserts an array of Parcelable values into the mapping of this Bundle, replacing any existing value for the given key.
voidputParcelableArrayList(@Nullable String key, @Nullable ArrayList value)
Inserts a List of Parcelable values into the mapping of this Bundle, replacing any existing value for the given key.
voidputSerializable(@Nullable String key, @Nullable Serializable value)
Inserts a Serializable value into the mapping of this Bundle, replacing any existing value for the given key.
voidputShort(@Nullable String key, short value)
Inserts a short value into the mapping of this Bundle, replacing any existing value for the given key.
voidputShortArray(@Nullable String key, @Nullable short[] value)
Inserts a short array value into the mapping of this Bundle, replacing any existing value for the given key.
voidputSparseParcelableArray(@Nullable String key, @Nullable SparseArray value)
Inserts a SparceArray of Parcelable values into the mapping of this Bundle, replacing any existing value for the given key.
voidputString(@Nullable String key, @Nullable String value)
Inserts a String value into the mapping of this Bundle, replacing any existing value for the given key.
voidputStringArray(@Nullable String key, @Nullable String[] value)
Inserts a String array value into the mapping of this Bundle, replacing any existing value for the given key.
voidputStringArrayList(@Nullable String key, @Nullable ArrayList value)
Inserts an ArrayList value into the mapping of this Bundle, replacing any existing value for the given key.
voidreadFromParcel(Parcel parcel)
Reads the Parcel contents into this Bundle, typically in order for it to be passed through an IBinder connection.
voidremove(String key)
Removes any entry with the given key from the mapping of this Bundle.
voidsetClassLoader(ClassLoader loader)
Changes the ClassLoader this Bundle uses when instantiating objects.
intsize()
Returns the number of mappings contained in this Bundle.
StringtoString()
voidwriteToParcel(Parcel parcel, int flags)
Writes the Bundle contents to a Parcel, typically in order for it to be passed through an IBinder connection.