public User getId(ClientEndPoint client) { User result = new User(); result.attachClient(client); for (User user : users) { if (client.equals(user.client)) result = user; } return result; }
public boolean containsClient(ClientEndPoint client) { for (User user : users) { if (client.equals(user.client)) return true; } return false; }