*/
@Override
public Integer getMaxSize() {
Integer maxSize = null;
MaxSizeConstraint maxSizeConstraint = (MaxSizeConstraint)appliedConstraints.get(MAX_SIZE_CONSTRAINT);
SizeConstraint sizeConstraint = (SizeConstraint)appliedConstraints.get(SIZE_CONSTRAINT);
if (maxSizeConstraint != null || sizeConstraint != null) {
int maxSizeConstraintValue = maxSizeConstraint == null ? Integer.MAX_VALUE : maxSizeConstraint.getMaxSize();
int sizeConstraintHighValue = sizeConstraint == null ? Integer.MAX_VALUE : sizeConstraint.getRange().getToInt();
maxSize = Math.min(maxSizeConstraintValue, sizeConstraintHighValue);
}
return maxSize;