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

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


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


    {
        this.checkNegativeCount(count);
        this.checkSizeLessThanCount(count);
        if (count == 0)
        {
            return new DoubleArrayList();
        }
        MutableDoubleList subList = new DoubleArrayList(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();
            DoubleArrayList deserializedDelegate = new DoubleArrayList(size);

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

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

    }

    @Override
    public MutableDoubleList collectDouble(DoubleFunction<? super T> doubleFunction)
    {
        DoubleArrayList result = new DoubleArrayList(this.size());
        this.forEach(new CollectDoubleProcedure<T>(doubleFunction, result));
        return result;
    }
View Full Code Here

        return this.collectChar(charFunction, new CharArrayList());
    }

    public MutableDoubleList collectDouble(DoubleFunction<? super T> doubleFunction)
    {
        return this.collectDouble(doubleFunction, new DoubleArrayList());
    }
View Full Code Here

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

        return new double[0];
    }

    public MutableDoubleList toSortedList()
    {
        return new DoubleArrayList();
    }
View Full Code Here

        return source.isEmpty();
    }

    public MutableDoubleList toList()
    {
        return new DoubleArrayList();
    }
View Full Code Here

        return true;
    }

    public ImmutableDoubleList select(DoublePredicate predicate)
    {
        DoubleArrayList result = new DoubleArrayList();
        for (double item : this.items)
        {
            if (predicate.accept(item))
            {
                result.add(item);
            }
        }
        return result.toImmutable();
    }
View Full Code Here

        return result.toImmutable();
    }

    public ImmutableDoubleList reject(DoublePredicate predicate)
    {
        DoubleArrayList result = new DoubleArrayList();
        for (double item : this.items)
        {
            if (!predicate.accept(item))
            {
                result.add(item);
            }
        }
        return result.toImmutable();
    }
View Full Code Here

TOP

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

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.