/** Returns true if this contact has a group entity with name {@code name}. */ public boolean hasGroup(long id) { for (GroupEntity entity : groups) { if (entity.getId() == id) { return true; } } return false; }
public Collection<GroupKey> getMembersAsKeys() { if (members == null) { return null; } Set<GroupKey> keys = new LinkedHashSet<GroupKey>(); for (GroupEntity group : members) { keys.add(group.getGroupKey()); } return keys; }
public WrongGroupTypeException(final GroupEntity group) { super( String.format( "Group '%s' (ID %d) was not of the expected type", group.getName(), group.getId())); }
public void addCandidateGroupEntity(GroupEntity group) { addCandidateGroup(group.getGroupId(), group.getGroupType()); }