Package org.apache.commons.lang.math

Examples of org.apache.commons.lang.math.IntRange


     * {@inheritDoc}
     */
    @Override
    public boolean isValid(List<PollItem> pollItems, ConstraintValidatorContext context) {
        if (!CollectionUtils.isEmpty(pollItems)) {
            Range range = new IntRange(minSize, maxSize);
            return range.containsInteger(pollItems.size());
        }
        return true;
    }
View Full Code Here


     * @return {@code true} if poll item name has correct length,
     *         otherwise {@code false}
     */
    private boolean isPollItemValid(PollItem pollItem) {
        String pollItemName = pollItem.getName();
        Range range = new IntRange(minLength, maxLenght);
        int pollItemLength = pollItemName.length();
        return range.containsInteger(pollItemLength);
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.lang.math.IntRange

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.