public Participant getParticipantFromUserID(String userID) { for (Participant p : getParticipants()) { if (p.getUserID().equals(userID)) { return p; } } return null; }
public Map<String, String> getParticipantIdentifiers(Identifier idType) { Map<String, String> idMap = new Hashtable<String, String>(); for (Participant p : getParticipants()) { String nameValue; switch (idType) { case FullName: nameValue = p.getFullName(); break; case ReverseFullName: nameValue = p.getLastName() + ", " + p.getFirstName(); break; case LastName: nameValue = p.getLastName(); break; default: nameValue = p.getUserID(); } idMap.put(p.getID(), nameValue); } return idMap; }