{
// check conditions
int size = Linq.count(iterable);
if (getMaxSize() == getMinSize())
if (size != getMaxSize())
throw new ValidationException(String.format(SHOULD_BE_EXACTLY, getName()) + getMaxSize());
if (size > getMaxSize())
throw new ValidationException(String.format(SHOULD_NOT_BE_GREATER_THAN, getName()) + getMaxSize());
if (size < getMinSize())
throw new ValidationException(String.format(SHOULD_NOT_BE_LESS_THAN, getName()) + getMinSize());
}