Skip to content

Most visited

Recently visited

navigation
Added in API level 5

ParcelUuid

public final class ParcelUuid
extends Object implements Parcelable

java.lang.Object
   ↳ android.os.ParcelUuid


This class is a Parcelable wrapper around UUID which is an immutable representation of a 128-bit universally unique identifier.

Summary

Inherited constants

From interface android.os.Parcelable

Fields

public static final Creator<ParcelUuid> CREATOR

Public constructors

ParcelUuid(UUID uuid)

Constructor creates a ParcelUuid instance from the given UUID.

Public methods

int describeContents()

Describe the kinds of special objects contained in this Parcelable's marshalled representation.

boolean equals(Object object)

Compares this ParcelUuid to another object for equality.

static ParcelUuid fromString(String uuid)

Creates a new ParcelUuid from a string representation of UUID.

UUID getUuid()

Get the UUID represented by the ParcelUuid.

int hashCode()

Returns an integer hash code for this object.

String toString()

Returns a string representation of the ParcelUuid For example: 0000110B-0000-1000-8000-00805F9B34FB will be the return value.

void writeToParcel(Parcel dest, int flags)

Flatten this object in to a Parcel.

Inherited methods

From class java.lang.Object
From interface android.os.Parcelable

Fields

CREATOR

Added in API level 5
Creator<ParcelUuid> CREATOR

Public constructors

ParcelUuid

Added in API level 5
ParcelUuid (UUID uuid)

Constructor creates a ParcelUuid instance from the given UUID.

Parameters
uuid UUID: UUID

Public methods

describeContents

Added in API level 5
int describeContents ()

Describe the kinds of special objects contained in this Parcelable's marshalled representation.

Returns
int a bitmask indicating the set of special object types marshalled by the Parcelable.

equals

Added in API level 5
boolean equals (Object object)

Compares this ParcelUuid to another object for equality. If object is not null, is a ParcelUuid instance, and all bits are equal, then true is returned.

Parameters
object Object: the Object to compare to.
Returns
boolean true if this ParcelUuid is equal to object or false if not.

fromString

Added in API level 5
ParcelUuid fromString (String uuid)

Creates a new ParcelUuid from a string representation of UUID.

Parameters
uuid String: the UUID string to parse.
Returns
ParcelUuid a ParcelUuid instance.
Throws
NullPointerException if uuid is null.
IllegalArgumentException if uuid is not formatted correctly.

getUuid

Added in API level 5
UUID getUuid ()

Get the UUID represented by the ParcelUuid.

Returns
UUID UUID contained in the ParcelUuid.

hashCode

Added in API level 5
int hashCode ()

Returns an integer hash code for this object. By contract, any two objects for which equals(Object) returns true must return the same hash code value. This means that subclasses of Object usually override both methods or neither method.

Note that hash values must not change over time unless information used in equals comparisons also changes.

See Writing a correct hashCode method if you intend implementing your own hashCode method.

Returns
int this object's hash code.

toString

Added in API level 5
String toString ()

Returns a string representation of the ParcelUuid For example: 0000110B-0000-1000-8000-00805F9B34FB will be the return value.

Returns
String a String instance.

writeToParcel

Added in API level 5
void writeToParcel (Parcel dest, 
                int flags)

Flatten this object in to a Parcel.

Parameters
dest Parcel: The Parcel in which the object should be written.
flags int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.