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

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


    }

    @Override
    public MutableBooleanList collectBoolean(final BooleanFunction<? super T> booleanFunction)
    {
        final BooleanArrayList result = new BooleanArrayList(this.size());
        this.forEach(new Procedure<T>()
        {
            public void value(T each)
            {
                result.add(booleanFunction.booleanValueOf(each));
            }
        });
        return result;
    }
View Full Code Here


        return true;
    }

    public ImmutableBooleanList select(BooleanPredicate predicate)
    {
        BooleanArrayList result = new BooleanArrayList();
        for (int i = 0; i < this.size; i++)
        {
            boolean item = this.items.get(i);
            if (predicate.accept(item))
            {
                result.add(item);
            }
        }
        return result.toImmutable();
    }
View Full Code Here

        return result.toImmutable();
    }

    public ImmutableBooleanList reject(BooleanPredicate predicate)
    {
        BooleanArrayList result = new BooleanArrayList();
        for (int i = 0; i < this.size; i++)
        {
            boolean item = this.items.get(i);
            if (!predicate.accept(item))
            {
                result.add(item);
            }
        }
        return result.toImmutable();
    }
View Full Code Here

    }

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

    public BooleanList peek(int count)
    {
        this.checkNegativeCount(count);
        if (count == 0)
        {
            return new BooleanArrayList(0);
        }
        throw new EmptyStackException();
    }
View Full Code Here

        return source.isEmpty();
    }

    public MutableBooleanList toList()
    {
        return new BooleanArrayList();
    }
View Full Code Here

    private transient BooleanArrayList delegate;

    public BooleanArrayStack()
    {
        this.delegate = new BooleanArrayList();
    }
View Full Code Here

        this.delegate = new BooleanArrayList();
    }

    private BooleanArrayStack(int size)
    {
        this.delegate = new BooleanArrayList(size);
    }
View Full Code Here

        this.delegate = new BooleanArrayList(size);
    }

    private BooleanArrayStack(boolean... items)
    {
        this.delegate = new BooleanArrayList(items);
    }
View Full Code Here

    {
        this.checkPositiveValueForCount(count);
        this.checkSizeLessThanCount(count);
        if (count == 0)
        {
            return new BooleanArrayList(0);
        }
        MutableBooleanList subList = new BooleanArrayList(count);
        while (count > 0)
        {
            subList.add(this.pop());
            count--;
        }
        return subList;
    }
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.