Package com.gs.collections.api.list.primitive

Examples of com.gs.collections.api.list.primitive.MutableDoubleList


        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


        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

            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

        return new ImmutableDoubleArrayList(newItems);
    }

    public ImmutableDoubleList newWithoutAll(DoubleIterable elements)
    {
        MutableDoubleList mutableDoubleList = this.toList();
        mutableDoubleList.removeAll(elements);
        return mutableDoubleList.toImmutable();
    }
View Full Code Here

    {
        if (objectArray == null)
        {
            throw new IllegalArgumentException("Cannot perform a collectDouble on null");
        }
        MutableDoubleList result = new DoubleArrayList(objectArray.length);
        for (T each : objectArray)
        {
            result.add(doubleFunction.doubleValueOf(each));
        }
        return result;
    }
View Full Code Here

        this.checkSizeLessThanCount(count);
        if (count == 0)
        {
            return new DoubleArrayList(0);
        }
        MutableDoubleList subList = new DoubleArrayList(count);
        while (count > 0)
        {
            subList.add(this.pop());
            count--;
        }
        return subList;
    }
View Full Code Here

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

        return (double) sortedArray[middleIndex];
    }

    public MutableDoubleList toList()
    {
        MutableDoubleList result = new DoubleArrayList(this.size());

        for (int i = 0; i < this.keys.length; i++)
        {
            if (isNonSentinel(this.keys[i]))
            {
                result.add(this.values[i]);
            }
        }
        return result;
    }
View Full Code Here

TOP

Related Classes of com.gs.collections.api.list.primitive.MutableDoubleList

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.