public final class User extends Object
A user is inherently linked to a chat room: an instance of User
can only be obtained by calling Room.getUser(long)
,
or by retrieving the user of a message with Message.getUser()
}. The same Stack Exchange user can have different
properties depending on the chat room it was obtained with, like being a room owner or not.
Modifier and Type | Method and Description |
---|---|
long |
getId()
Returns the id of this user.
|
Instant |
getLastMessageDate()
Returns the last date at which this user posted a message in the room (UTC).
|
Instant |
getLastSeenDate()
Returns the last date at which this user was seen in the room (UTC).
|
String |
getName()
Returns the display name of this user.
|
String |
getProfileLink()
Returns a link to the chat user profile of this user.
|
int |
getReputation()
Returns the amount of reputation this user has.
|
boolean |
isCurrentlyInRoom()
Tells whether this user is currently in this room or not.
|
boolean |
isModerator()
Tells whether this user is a moderator.
|
boolean |
isRoomOwner()
Tells whether this user is a room owner.
|
public long getId()
public String getName()
public int getReputation()
public boolean isModerator()
public boolean isRoomOwner()
public Instant getLastSeenDate()
null
in the case of
users that never joined the room.public Instant getLastMessageDate()
null
in the case of
users that never joined the room.public boolean isCurrentlyInRoom()
public String getProfileLink()