Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package com.robrua.orianna.api.core;
  
  import java.util.Arrays;
  import java.util.HashSet;
  import java.util.List;
  import java.util.Map;
  import java.util.Set;
 
 
 public abstract class TeamAPI {
    

Parameters:
teamID the ID of the team to get
Returns:
the team
 
     public static Team getTeam(final String teamID) {
         return getTeams(new String[] {teamID}).get(0);
     }

    

Parameters:
teamIDs the IDs of the teams to get
Returns:
the teams
 
     public static List<TeamgetTeams(final List<StringteamIDs) {
         if(teamIDs.isEmpty()) {
             return Collections.emptyList();
         }
 
         final List<Teamteams = new ArrayList<>();
         final Set<LongsumIDs = new HashSet<>();
         for(final List<Stringget : Utils.breakUpList(teamIDs, 10)) {
             final Map<Stringcom.robrua.orianna.type.dto.team.Teamtms = BaseRiotAPI.getTeamsByID(get);
             for(final String ID : get) {
                 final com.robrua.orianna.type.dto.team.Team team = tms.get(ID);
                 sumIDs.addAll(team.getSummonerIDs());
                 teams.add(new Team(team));
             }
         }
 
         if(. == .) {
             RiotAPI.getSummonersByID(new ArrayList<>(sumIDs));
         }
 
         return Collections.unmodifiableList(teams);
     }

    

Parameters:
teamIDs the IDs of the teams to get
Returns:
the teams
 
     public static List<TeamgetTeams(final String... teamIDs) {
         return getTeams(Arrays.asList(teamIDs));
     }

    

Parameters:
summoners the summoners to get teams for
Returns:
the summoners' teams
 
     public static List<List<Team>> getTeamsBySummoner(final List<Summonersummoners) {
         final List<LongIDs = new ArrayList<>();
         for(final Summoner summoner : summoners) {
             IDs.add(summoner.getID());
         }
 
         return getTeamsBySummonerID(IDs);
     }

    

Parameters:
summoners the summoners to get teams for
Returns:
the summoners' teams
 
     public static List<List<Team>> getTeamsBySummoner(final Summoner... summoners) {
         final List<LongIDs = new ArrayList<>();
         for(final Summoner summoner : summoners) {
             IDs.add(summoner.getID());
         }
 
         return getTeamsBySummonerID(IDs);
     }

    

Parameters:
summoner the summoner to get teams for
Returns:
the summoners' teams
 
     public static List<TeamgetTeamsBySummoner(final Summoner summoner) {
         return getTeamsBySummonerID(summoner.getID());
     }

    

Parameters:
summonerIDs the IDs of the summoners to get teams for
Returns:
the summoners' teams
    public static List<List<Team>> getTeamsBySummonerID(final List<LongsummonerIDs) {
        if(summonerIDs.isEmpty()) {
            return Collections.emptyList();
        }
        final List<List<Team>> teams = new ArrayList<>();
        final Set<LongsumIDs = new HashSet<>();
        for(final List<Longget : Utils.breakUpList(summonerIDs, 10)) {
            final Map<LongList<com.robrua.orianna.type.dto.team.Team>> tms = BaseRiotAPI.getTeamsBySummoner(get);
            for(final Long ID : get) {
                final List<Teamtm = new ArrayList<>();
                if(tms.get(ID) != null) {
                    for(final com.robrua.orianna.type.dto.team.Team team : tms.get(ID)) {
                        sumIDs.addAll(team.getSummonerIDs());
                        tm.add(new Team(team));
                    }
                }
                teams.add(Collections.unmodifiableList(tm));
            }
        }
        if(. == .) {
            RiotAPI.getSummonersByID(new ArrayList<>(sumIDs));
        }
        return Collections.unmodifiableList(teams);
    }

    

Parameters:
summonerIDs the IDs of the summoners to get teams for
Returns:
the summoners' teams
    public static List<List<Team>> getTeamsBySummonerID(final long... summonerIDs) {
        return getTeamsBySummonerID(Utils.convert(summonerIDs));
    }

    

Parameters:
summonerID the ID of the summoner to get teams for
Returns:
the summoner's teams
    public static List<TeamgetTeamsBySummonerID(final long summonerID) {
        return getTeamsBySummonerID(new long[] {summonerID}).get(0);
    }

    

Parameters:
summonerNames the names of the summoners to get teams for
Returns:
the summoners' teams
    public static List<List<Team>> getTeamsBySummonerName(final List<StringsummonerNames) {
        return getTeamsBySummoner(RiotAPI.getSummonersByName(summonerNames));
    }

    

Parameters:
summonerNames the names of the summoners to get teams for
Returns:
the summoners' teams
    public static List<List<Team>> getTeamsBySummonerName(final String... summonerNames) {
        return getTeamsBySummoner(RiotAPI.getSummonersByName(summonerNames));
    }

    

Parameters:
summonerName the names of the summoner to get teams for
Returns:
the summoner's teams
    public static List<List<Team>> getTeamsBySummonerName(final String summonerName) {
        return getTeamsBySummoner(RiotAPI.getSummonersByName(summonerName));
    }
New to GrepCode? Check out our FAQ X