Package com.carrotsearch.hppc.predicates

Examples of com.carrotsearch.hppc.predicates.BytePredicate


     * and negates the predicate.
     */
    @Override
    public int retainAll(final BytePredicate predicate)
    {
        return removeAll(new BytePredicate()
        {
            public boolean apply(byte value)
            {
                return !predicate.apply(value);
            };
View Full Code Here


    @Test
    public void testRemoveAllWithPredicate()
    {
        deque.addLast(newArray(deque.buffer, 0, key1, key2, key1, 4));

        assertEquals(3, deque.removeAll(new BytePredicate()
        {
            public boolean apply(/* replaceIf:applied. */ byte  /* end */ v)
            {
                return v == key1 || v == key2;
            };
View Full Code Here

        final RuntimeException t = new RuntimeException();

        try
        {
            assertEquals(3, deque.removeAll(new BytePredicate()
            {
                public boolean apply(/* replaceIf:applied. */ byte  /* end */ v)
                {
                    if (v == key2) throw t;
                    return v == key1;
View Full Code Here

TOP

Related Classes of com.carrotsearch.hppc.predicates.BytePredicate

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.