public final class EndUser extends Object implements Serializable
User and the augmented EndUser.
It adds proper hashCode, equals, toString as well as useful utility methods such as shortName() and fullName().
| Modifier and Type | Method and Description |
|---|---|
static EndUser |
endUser(Integer id,
String firstName,
String lastName,
String username) |
boolean |
equals(Object o) |
String |
firstName() |
static EndUser |
fromUser(org.telegram.telegrambots.api.objects.User user)
|
String |
fullName()
The full name is identified as the concatenation of the first and last name, separated by a space.
|
int |
hashCode() |
int |
id() |
String |
lastName() |
String |
shortName()
The short name is one of the following:
First name
Last name
Username
The method will try to return the first valid name in the specified order.
|
String |
toString() |
String |
username() |
public static EndUser endUser(Integer id, String firstName, String lastName, String username)
public static EndUser fromUser(org.telegram.telegrambots.api.objects.User user)
user - the Telegram userpublic int id()
public String firstName()
public String lastName()
public String username()
public String fullName()
public String shortName()
Copyright © 2017. All rights reserved.