Examples of containsInteger()


Examples of org.apache.commons.lang.math.IntRange.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

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

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

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

        while (iter.hasNext())
        {
            InterfaceArticle testIa = (InterfaceArticle) iter.next();
            assertEquals("should be same value", name, testIa.getArticleName());
            Integer id = testIa.getArticleId();
            assertTrue("Id should be a number of the generated articles", range.containsInteger(id));
        }

        // read one item only
        // 1. set query start equals end
        query.setStartAtIndex(4);
View Full Code Here

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

        // 2. check if only one item is found
        OJBIterator ojbIter = (OJBIterator)broker.getIteratorByQuery(query);
        assertEquals("size of iterator should be one", 1, ojbIter.size());
        InterfaceArticle test4 = (InterfaceArticle) ojbIter.next();
        ojbIter.releaseDbResources();
        assertTrue("Id should be a number of the generated articles", range.containsInteger(test4.getArticleId()));
    }

    public void testSorting() throws Exception
    {
        String name = "testSorting_" + System.currentTimeMillis();
View Full Code Here

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

        for(int i = 0; i < list.size(); i++)
        {
            a2 = a1;
            a1 =  (InterfaceArticle) list.get(i);
            if(i>0) assertTrue(a1.getArticleId().intValue() < a2.getArticleId().intValue());
            assertTrue(range.containsInteger(a1.getArticleId()));
        }
    }

    /**
     * Test the AutoIncrement facility
View Full Code Here

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

        while (iter.hasNext())
        {
            InterfaceArticle testIa = (InterfaceArticle) iter.next();
            assertEquals("should be same value", name, testIa.getArticleName());
            Integer id = testIa.getArticleId();
            assertTrue("Id should be a number of the generated articles", range.containsInteger(id));
        }

        // read one item only
        // 1. set query start equals end
        query.setStartAtIndex(4);
View Full Code Here

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

        // 2. check if only one item is found
        OJBIterator ojbIter = (OJBIterator)broker.getIteratorByQuery(query);
        assertEquals("size of iterator should be one", 1, ojbIter.size());
        InterfaceArticle test4 = (InterfaceArticle) ojbIter.next();
        ojbIter.releaseDbResources();
        assertTrue("Id should be a number of the generated articles", range.containsInteger(test4.getArticleId()));
    }

    public void testSorting() throws Exception
    {
        String name = "testSorting_" + System.currentTimeMillis();
View Full Code Here

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

        for(int i = 0; i < list.size(); i++)
        {
            a2 = a1;
            a1 =  (InterfaceArticle) list.get(i);
            if(i>0) assertTrue(a1.getArticleId().intValue() < a2.getArticleId().intValue());
            assertTrue(range.containsInteger(a1.getArticleId()));
        }
    }

    /**
     * Test the AutoIncrement facility
View Full Code Here

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

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

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