Person

public final class Person
extends Object implements Parcelable

java.lang.Object
   ↳ android.app.Person


Provides an immutable reference to an entity that appears repeatedly on different surfaces of the platform. For example, this could represent the sender of a message.

Summary

Nested classes

class Person.Builder

Builder for the immutable Person class. 

Inherited constants

Fields

public static final Creator<Person> CREATOR

Public methods

int describeContents()

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

Icon getIcon()
String getKey()
CharSequence getName()
String getUri()
boolean isBot()
boolean isImportant()
Person.Builder toBuilder()

Creates and returns a new Person.Builder initialized with this Person's data.

void writeToParcel(Parcel dest, int flags)

Flatten this object in to a Parcel.

Inherited methods

Fields

Public methods

describeContents

int describeContents ()

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of writeToParcel(Parcel, int), the return value of this method must include the CONTENTS_FILE_DESCRIPTOR bit.

Returns
int a bitmask indicating the set of special object types marshaled by this Parcelable object instance.

getIcon

Icon getIcon ()

Returns
Icon the icon provided for this person or null if no icon was provided.

getKey

String getKey ()

Returns
String the key provided for this person or null if no key was provided.

getName

CharSequence getName ()

Returns
CharSequence the name provided for this person or null if no name was provided.

getUri

String getUri ()

Returns
String the uri provided for this person or null if no Uri was provided.

isBot

boolean isBot ()

Returns
boolean whether this Person is a machine.

isImportant

boolean isImportant ()

Returns
boolean whether this Person is important.

toBuilder

Person.Builder toBuilder ()

Creates and returns a new Person.Builder initialized with this Person's data.

Returns
Person.Builder

writeToParcel

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.

Value is either 0 or PARCELABLE_WRITE_RETURN_VALUE.