Share via


PersistableBundle Class

Definition

A mapping from String keys to values of various types.

[Android.Runtime.Register("android/os/PersistableBundle", DoNotGenerateAcw=true)]
public sealed class PersistableBundle : Android.OS.BaseBundle, Android.OS.IParcelable, IDisposable, Java.Interop.IJavaPeerable, Java.Lang.ICloneable
[<Android.Runtime.Register("android/os/PersistableBundle", DoNotGenerateAcw=true)>]
type PersistableBundle = class
    inherit BaseBundle
    interface IParcelable
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
    interface ICloneable
Inheritance
PersistableBundle
Attributes
Implements

Remarks

A mapping from String keys to values of various types. The set of types supported by this class is purposefully restricted to simple objects that can safely be persisted to and restored from disk.

<b>Warning:</b> Note that PersistableBundle is a lazy container and as such it does NOT implement #equals(Object) or #hashCode().

Java documentation for android.os.PersistableBundle.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Constructors

PersistableBundle()

Constructs a new, empty PersistableBundle.

PersistableBundle(Int32)

Constructs a new, empty PersistableBundle sized to hold the given number of elements.

PersistableBundle(PersistableBundle)

Constructs a PersistableBundle containing a copy of the mappings from the given PersistableBundle.

Properties

Class

Returns the runtime class of this Object.

(Inherited from Object)
Creator
Empty

An unmodifiable PersistableBundle that is always #isEmpty() empty.

Handle

The handle to the underlying Android instance.

(Inherited from Object)
IsEmpty

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

(Inherited from BaseBundle)
JniIdentityHashCode (Inherited from Object)
JniPeerMembers
PeerReference (Inherited from Object)
ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

(Inherited from BaseBundle)
ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

(Inherited from BaseBundle)

Methods

Clear()

Removes all elements from the mapping of this Bundle.

(Inherited from BaseBundle)
Clone()

Clones the current PersistableBundle.

ContainsKey(String)

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

(Inherited from BaseBundle)
DeepCopy()

Make a deep copy of the given bundle.

DescribeContents()

Report the nature of this Parcelable's contents

Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
Get(String)

Returns the entry with the given key as an object.

(Inherited from BaseBundle)
GetBoolean(String, Boolean)

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

(Inherited from BaseBundle)
GetBoolean(String)

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

(Inherited from BaseBundle)
GetBooleanArray(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.

(Inherited from BaseBundle)
GetDouble(String, Double)

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

(Inherited from BaseBundle)
GetDouble(String)

Returns the value associated with the given key, or 0.

(Inherited from BaseBundle)
GetDoubleArray(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.

(Inherited from BaseBundle)
GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
GetInt(String, Int32)

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

(Inherited from BaseBundle)
GetInt(String)

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

(Inherited from BaseBundle)
GetIntArray(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.

(Inherited from BaseBundle)
GetLong(String, Int64)

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

(Inherited from BaseBundle)
GetLong(String)

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

(Inherited from BaseBundle)
GetLongArray(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.

(Inherited from BaseBundle)
GetPersistableBundle(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.

GetString(String, String)

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.

(Inherited from BaseBundle)
GetString(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.

(Inherited from BaseBundle)
GetStringArray(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.

(Inherited from BaseBundle)
JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
KeySet()

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

(Inherited from BaseBundle)
Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
PutAll(PersistableBundle)

Inserts all mappings from the given PersistableBundle into this BaseBundle.

(Inherited from BaseBundle)
PutBoolean(String, Boolean)

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

(Inherited from BaseBundle)
PutBooleanArray(String, Boolean[])

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

(Inherited from BaseBundle)
PutDouble(String, Double)

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

(Inherited from BaseBundle)
PutDoubleArray(String, Double[])

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

(Inherited from BaseBundle)
PutInt(String, Int32)

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

(Inherited from BaseBundle)
PutIntArray(String, Int32[])

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

(Inherited from BaseBundle)
PutLong(String, Int64)

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

(Inherited from BaseBundle)
PutLongArray(String, Int64[])

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

(Inherited from BaseBundle)
PutPersistableBundle(String, PersistableBundle)

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

PutString(String, String)

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

(Inherited from BaseBundle)
PutStringArray(String, String[])

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

(Inherited from BaseBundle)
ReadFromStream(Stream)

Reads a PersistableBundle from an InputStream.

Remove(String)

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

(Inherited from BaseBundle)
SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
Size()

Returns the number of mappings contained in this Bundle.

(Inherited from BaseBundle)
ToArray<T>() (Inherited from Object)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime() (Inherited from Object)
Wait()

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
WriteToParcel(Parcel, ParcelableWriteFlags)

Writes the PersistableBundle contents to a Parcel, typically in order for it to be passed through an IBinder connection.

WriteToStream(Stream)

Writes the content of the PersistableBundle to a OutputStream.

Explicit Interface Implementations

IJavaPeerable.Disposed() (Inherited from Object)
IJavaPeerable.DisposeUnlessReferenced() (Inherited from Object)
IJavaPeerable.Finalized() (Inherited from Object)
IJavaPeerable.JniManagedPeerState (Inherited from Object)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from Object)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from Object)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to