FileDocCategorySizeDatePackage
ParcelUuid.javaAPI DocAndroid 5.1 API3658Thu Mar 12 22:22:10 GMT 2015android.os

ParcelUuid

public final class ParcelUuid extends Object implements Parcelable
This class is a Parcelable wrapper around {@link UUID} which is an immutable representation of a 128-bit universally unique identifier.

Fields Summary
private final UUID
mUuid
public static final Parcelable.Creator
CREATOR
Constructors Summary
public ParcelUuid(UUID uuid)
Constructor creates a ParcelUuid instance from the given {@link UUID}.

param
uuid UUID

        mUuid = uuid;
    
Methods Summary
public intdescribeContents()


       
        return 0;
    
public booleanequals(java.lang.Object object)
Compares this ParcelUuid to another object for equality. If {@code object} is not {@code null}, is a ParcelUuid instance, and all bits are equal, then {@code true} is returned.

param
object the {@code Object} to compare to.
return
{@code true} if this ParcelUuid is equal to {@code object} or {@code false} if not.

       if (object == null) {
           return false;
       }

       if (this == object) {
           return true;
       }

       if (!(object instanceof ParcelUuid)) {
           return false;
       }

       ParcelUuid that = (ParcelUuid) object;

       return (this.mUuid.equals(that.mUuid));
   
public static android.os.ParcelUuidfromString(java.lang.String uuid)
Creates a new ParcelUuid from a string representation of {@link UUID}.

param
uuid the UUID string to parse.
return
a ParcelUuid instance.
throws
NullPointerException if {@code uuid} is {@code null}.
throws
IllegalArgumentException if {@code uuid} is not formatted correctly.

        return new ParcelUuid(UUID.fromString(uuid));
    
public java.util.UUIDgetUuid()
Get the {@link UUID} represented by the ParcelUuid.

return
UUID contained in the ParcelUuid.

        return mUuid;
    
public inthashCode()

       return mUuid.hashCode();
   
public java.lang.StringtoString()
Returns a string representation of the ParcelUuid For example: 0000110B-0000-1000-8000-00805F9B34FB will be the return value.

return
a String instance.

        return mUuid.toString();
    
public voidwriteToParcel(Parcel dest, int flags)

        dest.writeLong(mUuid.getMostSignificantBits());
        dest.writeLong(mUuid.getLeastSignificantBits());