public class Account extends Object implements GerritJsonDTO
| Constructor and Description |
|---|
Account()
Default constructor.
|
Account(net.sf.json.JSONObject json)
Constructor that fills with data directly.
|
Account(String name,
String email)
For easier testing.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
void |
fromJson(net.sf.json.JSONObject json)
Takes a JSON object and fills its internal data-structure.
|
String |
getEmail()
Account user's preferred email.
|
String |
getName()
Account user's full name.
|
String |
getNameAndEmail()
Gives the full name and email in the format
"name" <email@somewhere.com>. |
int |
hashCode() |
void |
setEmail(String email)
Account user's preferred email.
|
void |
setName(String name)
Account user's full name.
|
public Account()
public Account(net.sf.json.JSONObject json)
json - the JSON Object with data.fromJson(net.sf.json.JSONObject)public void fromJson(net.sf.json.JSONObject json)
GerritJsonDTOfromJson in interface GerritJsonDTOjson - the JSON Object.public String getEmail()
public void setEmail(String email)
email - the emailpublic String getName()
public void setName(String name)
name - the full namepublic String getNameAndEmail()
"name" <email@somewhere.com>.
If either the name or the email is null then null is returned.
If either is an empty string then an empty string is returned.Copyright © 2004-2015 Hudson. All Rights Reserved.