Package com.gs.collections.impl.list.mutable.primitive

Examples of com.gs.collections.impl.list.mutable.primitive.BooleanArrayList


        return target;
    }

    public MutableBooleanList collectBoolean(BooleanFunction<? super T> booleanFunction)
    {
        return this.collectBoolean(booleanFunction, new BooleanArrayList());
    }
View Full Code Here


            BooleanFunction<? super T> booleanFunction)
    {
        int size = list.size();
        if (ArrayListIterate.isOptimizableArrayList(list, size))
        {
            MutableBooleanList result = new BooleanArrayList(size);
            return ArrayListIterate.collectBooleanFromInternalArray(list, booleanFunction, size, result);
        }
        return RandomAccessListIterate.collectBoolean(list, booleanFunction);
    }
View Full Code Here

    {
        if (objectArray == null)
        {
            throw new IllegalArgumentException("Cannot perform a collectBoolean on null");
        }
        MutableBooleanList result = new BooleanArrayList(objectArray.length);
        for (T each : objectArray)
        {
            result.add(booleanFunction.booleanValueOf(each));
        }
        return result;
    }
View Full Code Here

     */
    public static <K, V> MutableBooleanCollection collectBoolean(
            Map<K, V> map,
            BooleanFunction<? super V> booleanFunction)
    {
        return collectBoolean(map, booleanFunction, new BooleanArrayList(map.size()));
    }
View Full Code Here

        return this.toList().toArray();
    }

    public MutableBooleanList toList()
    {
        final MutableBooleanList list = new BooleanArrayList();
        this.forEach(new BooleanProcedure()
        {
            public void value(boolean each)
            {
                list.add(each);
            }
        });
        return list;
    }
View Full Code Here

    }

    @Override
    public MutableBooleanList collectBoolean(BooleanFunction<? super V> booleanFunction)
    {
        BooleanArrayList result = new BooleanArrayList(this.size());
        this.forEach(new CollectBooleanProcedure<V>(booleanFunction, result));
        return result;
    }
View Full Code Here

    }

    @Override
    public ImmutableBooleanList collectBoolean(BooleanFunction<? super V> booleanFunction)
    {
        BooleanArrayList result = new BooleanArrayList(this.size());
        this.forEach(new CollectBooleanProcedure<V>(booleanFunction, result));
        return result.toImmutable();
    }
View Full Code Here

    private final BooleanArrayList delegate;

    private ImmutableBooleanArrayStack(boolean[] newElements)
    {
        this.checkOptimizedSize(newElements.length);
        this.delegate = new BooleanArrayList(newElements);
    }
View Full Code Here

        return new ImmutableBooleanArrayStack(BooleanArrayList.newList(items).reverseThis());
    }

    public ImmutableBooleanStack push(boolean item)
    {
        BooleanArrayList newDelegate = BooleanArrayList.newList(this.delegate);
        newDelegate.add(item);
        return new ImmutableBooleanArrayStack(newDelegate);
    }
View Full Code Here

        return new ImmutableBooleanArrayStack(newDelegate);
    }

    public ImmutableBooleanStack pop()
    {
        BooleanArrayList newDelegate = BooleanArrayList.newList(this.delegate);
        newDelegate.removeAtIndex(this.delegate.size() - 1);
        return BooleanStacks.immutable.with(newDelegate.toArray());
    }
View Full Code Here

TOP

Related Classes of com.gs.collections.impl.list.mutable.primitive.BooleanArrayList

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.