org.kohsuke.github.JsonTeams Maven / Gradle / Ivy
package org.kohsuke.github;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
/**
* @author Kohsuke Kawaguchi
*/
class JsonTeams {
public List teams;
Map toMap(GHOrganization org) {
Map r = new TreeMap();
for (GHTeam t : teams) {
t.org = org;
r.put(t.getName(),t);
}
return r;
}
Set toSet(GHOrganization org) {
Set r = new HashSet();
for (GHTeam t : teams) {
t.org = org;
r.add(t);
}
return r;
}
}