public final class User extends Object implements Parcelable
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<User> |
CREATOR |
static int |
USER_LABEL_NOT_EXIST |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
protected |
User(Parcel in,
ClassLoader loader) |
Modifier and Type | Method and Description |
---|---|
int |
describeContents() |
boolean |
equals(Object obj)
Compare if it's the same user.
|
String |
getAvatar()
Returns user avatar link.
|
Integer |
getLabel()
Returns user label.
|
String |
getName()
Returns user name
|
Role |
getRole()
Returns user role.
|
boolean |
isGuest()
Returns true if the user is a guest.
|
boolean |
isOnline()
Returns true if the user is online.
|
User |
setName(String name)
Sets name.
|
void |
writeToParcel(Parcel dest,
int flags) |
public static final int USER_LABEL_NOT_EXIST
public static final Parcelable.Creator<User> CREATOR
protected User(Parcel in, ClassLoader loader)
public void writeToParcel(Parcel dest, int flags)
writeToParcel
in interface Parcelable
public String getAvatar()
public String getName()
public Integer getLabel()
Label is a system-generated chat-wide unique id of a user. Notice that it's only unique in the same chatroom.
public boolean isGuest()
public Role getRole()
public boolean isOnline()
public User setName(String name)
name
- namepublic int describeContents()
describeContents
in interface Parcelable