private void load() { p.load(); int n = Integer.parseInt(p.getProperty("number_of_buddies", "0")); for (int i = 0; i < n; i++) { IMContact bud = new IMContact(p.getProperty("buddy" + i, ""), MessageCons.IM_STATUS_UNKNOWN); users.put(bud.getUsername(), bud); } }
public void addUser(IMContact user) { logger.debug("Added " + user.getUsername() + " to user list"); users.put(user.getUsername(), user); save(); }