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

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


        return result;
    }

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


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

    public MutableDoubleList toList()
    {
        final MutableDoubleList list = new DoubleArrayList();
        this.forEach(new DoubleProcedure()
        {
            public void value(double each)
            {
                list.add(each);
            }
        });
        return list;
    }
View Full Code Here

     */
    public static <T> MutableDoubleList collectDouble(
            List<T> list,
            DoubleFunction<? super T> doubleFunction)
    {
        return RandomAccessListIterate.collectDouble(list, doubleFunction, new DoubleArrayList(list.size()));
    }
View Full Code Here

            DoubleFunction<? super T> doubleFunction)
    {
        int size = list.size();
        if (ArrayListIterate.isOptimizableArrayList(list, size))
        {
            MutableDoubleList result = new DoubleArrayList(size);
            return ArrayListIterate.collectDoubleFromInternalArray(list, doubleFunction, size, result);
        }
        return RandomAccessListIterate.collectDouble(list, doubleFunction);
    }
View Full Code Here

     */
    public static <T> MutableDoubleCollection collectDouble(
            Iterator<T> iterator,
            DoubleFunction<? super T> doubleFunction)
    {
        MutableDoubleCollection result = new DoubleArrayList();
        while (iterator.hasNext())
        {
            result.add(doubleFunction.doubleValueOf(iterator.next()));
        }
        return result;
    }
View Full Code Here

        return result;
    }

    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 result.toImmutable();
    }

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

    private final DoubleArrayList delegate;

    private ImmutableDoubleArrayStack(double[] newElements)
    {
        this.checkOptimizedSize(newElements.length);
        this.delegate = new DoubleArrayList(newElements);
    }
View Full Code Here

        return new ImmutableDoubleArrayStack(DoubleArrayList.newList(items).reverseThis());
    }

    public ImmutableDoubleStack push(double item)
    {
        DoubleArrayList newDelegate = DoubleArrayList.newList(this.delegate);
        newDelegate.add(item);
        return new ImmutableDoubleArrayStack(newDelegate);
    }
View Full Code Here

        return new ImmutableDoubleArrayStack(newDelegate);
    }

    public ImmutableDoubleStack pop()
    {
        DoubleArrayList newDelegate = DoubleArrayList.newList(this.delegate);
        newDelegate.removeAtIndex(this.delegate.size() - 1);
        return DoubleStacks.immutable.with(newDelegate.toArray());
    }
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.