Modifier and Type | Class and Description |
---|---|
static class |
Player.Companion
Companion object that implements static methods to generate the model using a
JSONObject.
|
Modifier and Type | Field and Description |
---|---|
static Player.Companion |
Companion
Companion object that implements static methods to generate the model using a
JSONObject.
|
Constructor and Description |
---|
Player(int id,
java.lang.String name,
int teamId,
Team team)
Model class that models a Player
|
Modifier and Type | Method and Description |
---|---|
int |
component1()
:
|
java.lang.String |
component2()
:
|
int |
component3()
:
|
Team |
component4()
:
|
Player |
copy(int id,
java.lang.String name,
int teamId,
Team team)
Model class that models a Player
|
boolean |
equals(java.lang.Object p) |
int |
getId()
:
|
java.lang.String |
getName()
:
|
Team |
getTeam()
:
|
int |
getTeamId()
:
|
int |
hashCode() |
org.json.JSONObject |
toJson()
Converts the model object into a JSON object
|
java.lang.String |
toString() |
public static Player.Companion Companion
Companion object that implements static methods to generate the model using a JSONObject.
public Player(int id, java.lang.String name, int teamId, Team team)
Model class that models a Player
id
- : The database ID of the playername
- : The name of the playerteamId
- : The ID of the player's teamteam
- : The player's teamid
- : The database ID of the playername
- : The name of the playerteamId
- : The ID of the player's teamteam
- : The player's teampublic org.json.JSONObject toJson()
Converts the model object into a JSON object
public int getId()
:
The database ID of the player
public java.lang.String getName()
:
The name of the player
public int getTeamId()
:
The ID of the player's team
public Team getTeam()
:
The player's team
public int component1()
:
The database ID of the player
public java.lang.String component2()
:
The name of the player
public int component3()
:
The ID of the player's team
public Team component4()
:
The player's team
public Player copy(int id, java.lang.String name, int teamId, Team team)
Model class that models a Player
id
- : The database ID of the playername
- : The name of the playerteamId
- : The ID of the player's teamteam
- : The player's teampublic java.lang.String toString()
public int hashCode()
public boolean equals(java.lang.Object p)