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

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


        if (count == 0)
        {
            return this;
        }
        this.checkSizeLessThanCount(count);
        BooleanArrayList newDelegate = BooleanArrayList.newList(this.delegate);
        while (count > 0)
        {
            newDelegate.removeAtIndex(newDelegate.size() - 1);
            count--;
        }
        return BooleanStacks.immutable.with(newDelegate.toArray());
    }
View Full Code Here


    {
        this.checkNegativeCount(count);
        this.checkSizeLessThanCount(count);
        if (count == 0)
        {
            return new BooleanArrayList();
        }
        MutableBooleanList subList = new BooleanArrayList(count);
        int index = this.delegate.size() - 1;
        for (int i = 0; i < count; i++)
        {
            subList.add(this.delegate.get(index - i));
        }
        return subList;
    }
View Full Code Here

        }

        public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
        {
            int size = in.readInt();
            BooleanArrayList deserializedDelegate = new BooleanArrayList(size);

            for (int i = 0; i < size; i++)
            {
                deserializedDelegate.add(in.readBoolean());
            }

            this.stack = ImmutableBooleanArrayStack.newStackFromTopToBottom(deserializedDelegate);
        }
View Full Code Here

    }

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

        return Bags.immutable.of();
    }

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

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

        return result.toImmutable();
    }

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

    }

    public ImmutableBooleanList select(BooleanPredicate predicate)
    {
        return predicate.accept(this.element1) ? BooleanArrayList.newListWith(this.element1).toImmutable()
                : new BooleanArrayList().toImmutable();
    }
View Full Code Here

                : new BooleanArrayList().toImmutable();
    }

    public ImmutableBooleanList reject(BooleanPredicate predicate)
    {
        return predicate.accept(this.element1) ? new BooleanArrayList().toImmutable()
                : BooleanArrayList.newListWith(this.element1).toImmutable();
    }
View Full Code Here

        return this.element1 == element ? BooleanLists.immutable.with() : this;
    }

    public ImmutableBooleanList newWithAll(BooleanIterable elements)
    {
        BooleanArrayList arrayList = BooleanArrayList.newListWith(this.element1);
        arrayList.addAll(elements);
        return arrayList.toImmutable();
    }
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.