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; }
public synchronized boolean contains(ArenaTeam team) { for (QueueObject qo : this) { if (qo.hasTeam(team)) return true; } return false; }