Examples of LongPredicate


Examples of com.carrotsearch.hppc.predicates.LongPredicate

    @Override
    public int removeAll(final LongLookupContainer c)
    {
        // We know c holds sub-types of long and we're not modifying c, so go unchecked.
        final LongContainer c2 = (LongContainer) c;
        return this.removeAll(new LongPredicate()
        {
            public boolean apply(long k)
            {
                return c2.contains(k);
            }
View Full Code Here

Examples of com.carrotsearch.hppc.predicates.LongPredicate

    @Override
    public int retainAll(final LongLookupContainer c)
    {
        // We know c holds sub-types of long and we're not modifying c, so go unchecked.
        final LongContainer c2 = (LongContainer) c;
        return this.removeAll(new LongPredicate()
        {
            public boolean apply(long k)
            {
                return !c2.contains(k);
            }
View Full Code Here

Examples of com.carrotsearch.hppc.predicates.LongPredicate

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

Examples of com.carrotsearch.hppc.predicates.LongPredicate

    @Override
    public int removeAll(final LongLookupContainer c)
    {
        // We know c holds sub-types of long and we're not modifying c, so go unchecked.
        final LongContainer c2 = (LongContainer) c;
        return this.removeAll(new LongPredicate()
        {
            public boolean apply(long k)
            {
                return c2.contains(k);
            }
View Full Code Here

Examples of com.carrotsearch.hppc.predicates.LongPredicate

    @Override
    public int retainAll(final LongLookupContainer c)
    {
        // We know c holds sub-types of long and we're not modifying c, so go unchecked.
        final LongContainer c2 = (LongContainer) c;
        return this.removeAll(new LongPredicate()
        {
            public boolean apply(long k)
            {
                return !c2.contains(k);
            }
View Full Code Here

Examples of com.carrotsearch.hppc.predicates.LongPredicate

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

Examples of com.carrotsearch.hppc.predicates.LongPredicate

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

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

Examples of com.carrotsearch.hppc.predicates.LongPredicate

        final RuntimeException t = new RuntimeException();

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

Examples of com.carrotsearch.hppc.predicates.LongPredicate

    @Override
    public int removeAll(final LongLookupContainer c)
    {
        // We know c holds sub-types of long and we're not modifying c, so go unchecked.
        final LongContainer c2 = (LongContainer) c;
        return this.removeAll(new LongPredicate()
        {
            public boolean apply(long k)
            {
                return c2.contains(k);
            }
View Full Code Here

Examples of com.carrotsearch.hppc.predicates.LongPredicate

    @Override
    public int retainAll(final LongLookupContainer c)
    {
        // We know c holds sub-types of long and we're not modifying c, so go unchecked.
        final LongContainer c2 = (LongContainer) c;
        return this.removeAll(new LongPredicate()
        {
            public boolean apply(long k)
            {
                return !c2.contains(k);
            }
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.