forked from reposense/RepoSense
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStandaloneAuthor.java
More file actions
69 lines (55 loc) · 1.7 KB
/
Copy pathStandaloneAuthor.java
File metadata and controls
69 lines (55 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
package reposense.model;
import java.util.Collections;
import java.util.List;
/**
* Represents an author in {@code StandaloneConfig}.
*/
public class StandaloneAuthor {
private String githubId;
private List<String> emails;
private String displayName;
private List<String> authorNames;
private List<String> ignoreGlobList;
public String getGithubId() {
return githubId;
}
public List<String> getEmails() {
if (emails == null) {
return Collections.emptyList();
}
return emails;
}
public String getDisplayName() {
if (displayName == null) {
return "";
}
return displayName;
}
public List<String> getAuthorNames() {
if (authorNames == null) {
return Collections.emptyList();
}
return authorNames;
}
public List<String> getIgnoreGlobList() {
if (ignoreGlobList == null) {
return Collections.emptyList();
}
return ignoreGlobList;
}
@Override
public boolean equals(Object other) {
if (this == other) {
return true;
}
if (!(other instanceof StandaloneAuthor)) {
return false;
}
StandaloneAuthor otherStandaloneAuthor = (StandaloneAuthor) other;
return githubId.equals(otherStandaloneAuthor.githubId)
&& getEmails().equals(otherStandaloneAuthor.getEmails())
&& getDisplayName().equals(otherStandaloneAuthor.getDisplayName())
&& getAuthorNames().equals(otherStandaloneAuthor.getAuthorNames())
&& getIgnoreGlobList().equals(otherStandaloneAuthor.getIgnoreGlobList());
}
}