/** 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 WrongGroupTypeException(final GroupEntity group) { super( String.format( "Group '%s' (ID %d) was not of the expected type", group.getName(), group.getId())); }