code: public void setMaxSubsetSize(int maxSubsetSize) {
          // check size
          if(maxSubsetSize < minSubsetSize){
              throw new IllegalArgumentException("Error while setting maximum subset size: should be >= minimum subset size.");
          }
          if(maxSubsetSize > getData().getIDs().size()){
              throw new IllegalArgumentException("Error while setting maximum subset size: can not be larger "
                                                  + "than number of items in underlying data.");
          }
          this.maxSubsetSize = maxSubsetSize;
      }
docs: Set the maximum subset size. Specified size should be &ge; the current minimum subset size
  and &le; the number of items in the underlying data.
  
  @param maxSubsetSize new maximum subset size
  @throws IllegalArgumentException if an invalid maximum size is given