Package org.apache.commons.lang.math

Examples of org.apache.commons.lang.math.Range.containsInteger()


     */
    @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


     */
    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
Copyright © 2018 www.massapi.com. 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.