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

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


     */
    public static <T> MutableFloatList collectFloat(
            List<T> list,
            FloatFunction<? super T> floatFunction)
    {
        return RandomAccessListIterate.collectFloat(list, floatFunction, new FloatArrayList(list.size()));
    }
View Full Code Here


    private final FloatArrayList delegate;

    private ImmutableFloatArrayStack(float[] newElements)
    {
        this.checkOptimizedSize(newElements.length);
        this.delegate = new FloatArrayList(newElements);
    }
View Full Code Here

        return new ImmutableFloatArrayStack(FloatArrayList.newList(items).reverseThis());
    }

    public ImmutableFloatStack push(float item)
    {
        FloatArrayList newDelegate = FloatArrayList.newList(this.delegate);
        newDelegate.add(item);
        return new ImmutableFloatArrayStack(newDelegate);
    }
View Full Code Here

        return new ImmutableFloatArrayStack(newDelegate);
    }

    public ImmutableFloatStack pop()
    {
        FloatArrayList newDelegate = FloatArrayList.newList(this.delegate);
        newDelegate.removeAtIndex(this.delegate.size() - 1);
        return FloatStacks.immutable.with(newDelegate.toArray());
    }
View Full Code Here

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

            FloatFunction<? super T> floatFunction)
    {
        int size = list.size();
        if (ArrayListIterate.isOptimizableArrayList(list, size))
        {
            MutableFloatList result = new FloatArrayList(size);
            return ArrayListIterate.collectFloatFromInternalArray(list, floatFunction, size, result);
        }
        return RandomAccessListIterate.collectFloat(list, floatFunction);
    }
View Full Code Here

     */
    public static <T> MutableFloatCollection collectFloat(
            Iterator<T> iterator,
            FloatFunction<? super T> floatFunction)
    {
        MutableFloatCollection result = new FloatArrayList();
        while (iterator.hasNext())
        {
            result.add(floatFunction.floatValueOf(iterator.next()));
        }
        return result;
    }
View Full Code Here

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

        return result;
    }

    public MutableFloatList collectFloat(FloatFunction<? super T> floatFunction)
    {
        FloatArrayList result = new FloatArrayList(this.size());
        this.forEach(new CollectFloatProcedure<T>(floatFunction, result));
        return result;
    }
View Full Code Here

        return result.toImmutable();
    }

    public ImmutableFloatList collectFloat(FloatFunction<? super T> floatFunction)
    {
        FloatArrayList result = new FloatArrayList(this.size());
        this.forEach(new CollectFloatProcedure<T>(floatFunction, result));
        return result.toImmutable();
    }
View Full Code Here

TOP

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

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.