@Override public int getNumObjects(ValidationContext ctx, Event e) { return e.getNumEventAssignments(); } @Override
@Override public boolean check(ValidationContext ctx, Event e) { return e.getNumEventAssignments() != 0; } };
/** * Removes an element from the listOfEventAssignments at the given index. * * @param i the index where to remove the {@link EventAssignment}. * @return the specified element, if it was successfully found and removed. * @throws IndexOutOfBoundsException if the listOf is not set or * if the index is out of bound (index < 0 || index > list.size). */ public EventAssignment removeEventAssignment(int i) { if ((i >= getNumEventAssignments()) || (i < 0)) { throw new IndexOutOfBoundsException(Integer.toString(i)); } return listOfEventAssignments.remove(i); }