public class User extends Descriptor
| Modifier and Type | Field and Description |
|---|---|
protected String |
avatar |
protected String |
bio |
protected int |
ID |
protected boolean |
isBanned |
protected String |
name |
| Modifier and Type | Method and Description |
|---|---|
LoggedUser |
asLogged()
This object, as a LoggedUser.
|
Optional<String> |
avatar()
The avatar of this user: the raw URL written in a String object, as specified by the server.
|
Optional<URL> |
avatarUrl()
The avatar of this user: a URL object is created and points to the location of the avatar picture.
|
String |
bio()
The bio of this user.
|
CacheManager |
cacheManager()
The Cache Manager that handles this object.
|
boolean |
canEdit()
Can this user be edited?
|
boolean |
equals(Object o) |
int |
getID()
The ID of this user.
|
int |
hashCode() |
boolean |
isBanned()
Is this user banned?
|
String |
name()
The name of this user.
|
String |
toString() |
void |
update()
Updates this Descriptor.
|
isNew, isValid, isValid, useprotected final int ID
protected String name
protected String avatar
protected String bio
protected boolean isBanned
public void update()
throws NoSuchEntityException,
net.wildfyre.http.Request.CantConnectException
DescriptorThe update is always executed in the current thread.
update in class DescriptorNoSuchEntityExceptionnet.wildfyre.http.Request.CantConnectExceptionpublic CacheManager cacheManager()
DescriptorcacheManager in class Descriptorpublic boolean canEdit()
This method will always return false for a User, and will always return true for a
LoggedUser
true if the user's information can edited.Get this object as a LoggedUserpublic final LoggedUser asLogged() throws ClassCastException
ClassCastException - if this object cannot be converted to a LoggedUser.Can this object be converted to a LoggedUser?public int getID()
public Optional<String> avatar()
public Optional<URL> avatarUrl()
public String bio()
public boolean isBanned()
true if this user is banned.public String name()