forked from reposense/RepoSense
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGroupConfiguration.java
More file actions
51 lines (38 loc) · 1.22 KB
/
Copy pathGroupConfiguration.java
File metadata and controls
51 lines (38 loc) · 1.22 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
package reposense.model;
import java.util.ArrayList;
import java.util.List;
/**
* Represents groups configuration information from CSV config file for a single repository.
* This class is only used to add the contents in {@code groups} into the respective repo configurations.
*/
public class GroupConfiguration {
private RepoLocation location;
private transient List<FileType> groups = new ArrayList<>();
public GroupConfiguration(RepoLocation location) {
this.location = location;
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if (!(other instanceof GroupConfiguration)) {
return false;
}
GroupConfiguration otherGroupConfig = (GroupConfiguration) other;
return location.equals(otherGroupConfig.location)
&& groups.equals(otherGroupConfig.groups);
}
public List<FileType> getGroupsList() {
return groups;
}
public void addGroup(FileType group) {
groups.add(group);
}
public boolean containsGroup(FileType group) {
return groups.contains(group);
}
public RepoLocation getLocation() {
return location;
}
}