Skip to content

Commit

Permalink
Adding name attribute to User. Will be very useful when we start doin…
Browse files Browse the repository at this point in the history
…g local Git analysis with Commit authorship concerns
  • Loading branch information
Rodrigo Alves committed Sep 5, 2013
1 parent 019ca7c commit 6177b1d
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion src/java/main/br/ufpe/cin/groundhog/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@
* @author gustavopinto, Rodrigo Alves
*/
public class User implements GitHubEntity {
@SerializedName("id")
@SerializedName("id")
private int id;

@SerializedName("name")
private String name;

@SerializedName("login")
private String login;

Expand Down Expand Up @@ -55,6 +58,11 @@ public User(String login) {
this.login = login;
}

public User(String login, String name) {
this(login);
this.name = name;
}

/**
* Informs the GitHub ID for the {@link User} object in question
* This ID is unique in GitHub, which means no two users can have the same ID on GitHub
Expand All @@ -68,6 +76,22 @@ public void setId(int id) {
this.id = id;
}

/**
* Informs the User name. Useful for measuring commit authorship
* @return a {@link String} object
*/
public String getName() {
return this.name;
}

/**
* Sets the name of the User
* @param name
*/
public void setName(String name) {
this.name = name;
}

/**
* Informs the login (username) of the {@link User}
* @return
Expand Down

0 comments on commit 6177b1d

Please sign in to comment.