All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.kohsuke.github.JsonTeams Maven / Gradle / Ivy

There is a newer version: 2.0.0-alpha-2
Show newest version
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;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy