Пример #1
0
 /** 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;
 }
Пример #2
0
 public WrongGroupTypeException(final GroupEntity group) {
   super(
       String.format(
           "Group '%s' (ID %d) was not of the expected type", group.getName(), group.getId()));
 }