Java Reference
In-Depth Information
= new Hashtable<UUID, List<AtBatResult>>();
private Hashtable<UUID, List<AttemptResult>> fielding
= new Hashtable<UUID, List<AttemptResult>>();
private Hashtable<UUID, Integer> passedBalls
= new Hashtable<UUID, Integer>();
public BoxScoreImpl(String team1, String team2){
teams.add(team1);
teams.add(team2);
}
@Override
public List<String> getTeams() {
return(teams);
}
@Override
public List<UUID> getPlayers(String forTeam) {
return(whoPlayed.get(forTeam));
}
@Override
public Position getPosition(UUID forPlayer) throws DidNotPlayException {
if (positions.contains(forPlayer))
return positions.get(forPlayer);
else
throw new DidNotPlayException();
}
@Override
public List<AtBatResult> getBatting(UUID playerID)
throws DidNotPlayException {
if (atBats.get(playerID) == null ) {
throw new DidNotPlayException();
} else {
return atBats.get(playerID);
}
}
@Override
public List<AttemptResult> getFielding(UUID forPlayer) {
return fielding.get(forPlayer);
}
@Override
public int getPassedBalls(UUID forPlayer) {
return passedBalls.get(forPlayer).intValue();
Search WWH ::




Custom Search