// Path: src/main/java/com/sonymobile/tools/gerrit/gerritevents/dto/GerritEventKeys.java
// public static final String EMAIL = "email";
// 
// Path: src/main/java/com/sonymobile/tools/gerrit/gerritevents/dto/GerritEventKeys.java
// public static final String NAME = "name";
// 
// Path: src/main/java/com/sonymobile/tools/gerrit/gerritevents/dto/GerritEventKeys.java
// public static final String USERNAME = "username";


import static com.sonymobile.tools.gerrit.gerritevents.dto.GerritEventKeys.USERNAME;
import com.sonymobile.tools.gerrit.gerritevents.dto.GerritJsonDTO;
import net.sf.json.JSONObject;
import static com.sonymobile.tools.gerrit.gerritevents.GerritJsonEventFactory.getString;
import static com.sonymobile.tools.gerrit.gerritevents.dto.GerritEventKeys.EMAIL;
import static com.sonymobile.tools.gerrit.gerritevents.dto.GerritEventKeys.NAME;
     *
     * @param username the username
     */
    public void setUsername(String username) {
        this.username = username;
    }

    /**
     * Gives the full name and email in the format <code>"name" &lt;email@somewhere.com&gt;</code>.
     * 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.
     *
     * @return the name and email in one string.
     */
    public String getNameAndEmail() {
        if (name == null || email == null) {
            return null;
        } else if (email.isEmpty() || name.isEmpty()) {
            return "";
        } else {
            StringBuffer str = new StringBuffer("\"");
            str.append(name).append("\" <").append(email).append(">");
            return str.toString();
        }
    }

    //CS IGNORE NeedBraces FOR NEXT 22 LINES. REASON: Auto generated code.
    //CS IGNORE MagicNumber FOR NEXT 22 LINES. REASON: Auto generated code.
    //CS IGNORE AvoidInlineConditionals FOR NEXT 22 LINES. REASON: Auto generated code.

// Path: src/main/java/com/sonymobile/tools/gerrit/gerritevents/dto/GerritEventKeys.java
// public static final String EMAIL = "email";
// 
// Path: src/main/java/com/sonymobile/tools/gerrit/gerritevents/dto/GerritEventKeys.java
// public static final String NAME = "name";
// 
// Path: src/main/java/com/sonymobile/tools/gerrit/gerritevents/dto/GerritEventKeys.java
// public static final String USERNAME = "username";


// Path: src/main/java/com/sonymobile/tools/gerrit/gerritevents/dto/attr/Account.java
import static com.sonymobile.tools.gerrit.gerritevents.dto.GerritEventKeys.USERNAME;
import com.sonymobile.tools.gerrit.gerritevents.dto.GerritJsonDTO;
import net.sf.json.JSONObject;
import static com.sonymobile.tools.gerrit.gerritevents.GerritJsonEventFactory.getString;
import static com.sonymobile.tools.gerrit.gerritevents.dto.GerritEventKeys.EMAIL;
import static com.sonymobile.tools.gerrit.gerritevents.dto.GerritEventKeys.NAME;

     *
     * @param username the username
     */
    public void setUsername(String username) {
        this.username = username;
    }

    /**
     * Gives the full name and email in the format <code>"name" &lt;email@somewhere.com&gt;</code>.
     * 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.
     *
     * @return the name and email in one string.
     */
    public String getNameAndEmail() {
        if (name == null || email == null) {
            return null;
        } else if (email.isEmpty() || name.isEmpty()) {
            return "";
        } else {
            StringBuffer str = new StringBuffer("\"");
            str.append(name).append("\" <").append(email).append(">");
            return str.toString();
        }
    }

    //CS IGNORE NeedBraces FOR NEXT 22 LINES. REASON: Auto generated code.
    //CS IGNORE MagicNumber FOR NEXT 22 LINES. REASON: Auto generated code.
    //CS IGNORE AvoidInlineConditionals FOR NEXT 22 LINES. REASON: Auto generated code.

    @Override