Make IdData more immutable.
This commit is contained in:
parent
d65323efb1
commit
7d0eba1665
@ -6,13 +6,13 @@ public class IdData
|
|||||||
// FIELDS
|
// FIELDS
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
|
||||||
private String id;
|
protected final String id;
|
||||||
public String getId() { return this.id; }
|
public String getId() { return this.id; }
|
||||||
|
|
||||||
private String name;
|
protected final String name;
|
||||||
public String getName() { return this.name; }
|
public String getName() { return this.name; }
|
||||||
|
|
||||||
private long millis;
|
protected final long millis;
|
||||||
public long getMillis() { return this.millis; }
|
public long getMillis() { return this.millis; }
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
@ -20,9 +20,12 @@ public class IdData
|
|||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
|
||||||
// It's always good to have a no-arg constructor
|
// It's always good to have a no-arg constructor
|
||||||
|
// In our case it will be used by GSON.
|
||||||
public IdData()
|
public IdData()
|
||||||
{
|
{
|
||||||
|
id = null;
|
||||||
|
name = null;
|
||||||
|
millis = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IdData(String id, String name)
|
public IdData(String id, String name)
|
||||||
|
Loading…
Reference in New Issue
Block a user