Modifier and Type | Class and Description |
---|---|
static class |
User.Companion
Companion object that implements static methods to generate the model using a
JSONObject.
|
Modifier and Type | Field and Description |
---|---|
static User.Companion |
Companion
Companion object that implements static methods to generate the model using a
JSONObject.
|
Constructor and Description |
---|
User(int id,
java.lang.String username,
java.lang.String email,
boolean confirmed)
Model class that models a User
|
Modifier and Type | Method and Description |
---|---|
int |
component1()
:
|
java.lang.String |
component2()
:
|
java.lang.String |
component3()
:
|
boolean |
component4()
:
|
User |
copy(int id,
java.lang.String username,
java.lang.String email,
boolean confirmed)
Model class that models a User
|
boolean |
equals(java.lang.Object p) |
boolean |
getConfirmed()
:
|
java.lang.String |
getEmail()
:
|
int |
getId()
:
|
java.lang.String |
getUsername()
:
|
int |
hashCode() |
org.json.JSONObject |
toJson()
Converts the model object into a JSON object
|
java.lang.String |
toString() |
public static User.Companion Companion
Companion object that implements static methods to generate the model using a JSONObject.
public User(int id, java.lang.String username, java.lang.String email, boolean confirmed)
Model class that models a User
id
- : The database ID of the userusername
- : The user's usernameemail
- : The email address of the userconfirmed
- : Indicates whether or not the user is confirmedid
- : The database ID of the userusername
- : The user's usernameemail
- : The email address of the userconfirmed
- : Indicates whether or not the user is confirmedpublic org.json.JSONObject toJson()
Converts the model object into a JSON object
public int getId()
:
The database ID of the user
public java.lang.String getUsername()
:
The user's username
public java.lang.String getEmail()
:
The email address of the user
public boolean getConfirmed()
:
Indicates whether or not the user is confirmed
public int component1()
:
The database ID of the user
public java.lang.String component2()
:
The user's username
public java.lang.String component3()
:
The email address of the user
public boolean component4()
:
Indicates whether or not the user is confirmed
public User copy(int id, java.lang.String username, java.lang.String email, boolean confirmed)
Model class that models a User
id
- : The database ID of the userusername
- : The user's usernameemail
- : The email address of the userconfirmed
- : Indicates whether or not the user is confirmedpublic java.lang.String toString()
public int hashCode()
public boolean equals(java.lang.Object p)