code: @Override
      public SubsetValidation validate(Move<? super SubsetSolution> move,
                                       SubsetSolution curSolution,
                                       Validation curValidation){
          // check type and cast
          if(move instanceof SubsetMove){
  
              SubsetMove subsetMove = (SubsetMove) move;
              
              // update and check size
              int newSize = curSolution.getNumSelectedIDs() + subsetMove.getNumAdded() - subsetMove.getNumDeleted();
              boolean validSize = newSize >= getMinSubsetSize() && newSize <= getMaxSubsetSize();
              
              // combine with mandatory constraint delta validation
              if(getMandatoryConstraints().isEmpty()){
                  // CASE 1: no mandatory constraints -- return constant validation object
                  return validSize ? UNCONSTRAINED_VALID_SIZE : UNCONSTRAINED_INVALID_SIZE;
              } else {
                  // CASE 2: mandatory constraint(s) -- extract and update mandatory constraints validation
                  SubsetValidation subsetVal = (SubsetValidation) curValidation;
                  // delta validation of mandatory constraints
                  Validation deltaVal = super.validate(subsetMove, curSolution, subsetVal.getConstraintValidation());
                  // create and return new subset validation
                  return new SubsetValidation(validSize, deltaVal);
              }
              
          } else {
              throw new IncompatibleDeltaValidationException("Delta validation in subset problem expects moves "
                                                              + "of type SubsetMove. Received: "
                                                              + move.getClass().getSimpleName());
          }
      }
docs: Validate a move to be applied to the current subset solution of a local search (delta validation).
  A subset problem can only perform delta validation for moves of type {@link SubsetMove}. If the
  received move has a different type an {@link IncompatibleDeltaValidationException} is thrown.
  
  @param move subset move to be validated
  @param curSolution current solution
  @param curValidation current validation
  @return subset validation of modified subset solution
  @throws IncompatibleDeltaValidationException if the received move is not of type {@link SubsetMove}
  or if the delta validation of any mandatory constraint
  is not compatible with the received move type