Exemplo n.º 1
0
 public synchronized ArenaTeam remove(ArenaTeam team) {
   Iterator<QueueObject> iter = this.iterator();
   while (iter.hasNext()) {
     QueueObject qo = iter.next();
     if (qo.hasTeam(team)) {
       iter.remove();
       playerSize -= qo.getNumPlayers();
       teamSize -= qo.getTeams().size();
       return team;
     }
   }
   return null;
 }
Exemplo n.º 2
0
 public synchronized boolean contains(ArenaTeam team) {
   for (QueueObject qo : this) {
     if (qo.hasTeam(team)) return true;
   }
   return false;
 }