code: public List<Friend> getFriends(Filter<Friend> filter) {
  		final ArrayList<Friend> friends = new ArrayList<>();
  		for (final RosterEntry e : connection.getRoster().getEntries()) {
  			final Friend f = new Friend(this, connection, e);
  			if (filter.accept(f)) {
  				friends.add(f);
  			}
  		}
  		return friends;
  	}
docs: Gets a list of your friends based on a given filter.
  
  @param filter
  The filter defines conditions that your Friends must meet.
  @return A List of your Friends that meet the condition of your Filter