public void deleteFriend() { for (Friend friend : friends) { if (friend.getName().equals(this.deleteFriendName)) { friends.remove(friend); break; } } }
public boolean hasFriend(String name) { boolean has = false; for (Friend friend : friends) { if (friend.getName().equals(name)) { has = true; break; } } return has; }