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

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


            IntFunction<? super T> intFunction)
    {
        int size = list.size();
        if (ArrayListIterate.isOptimizableArrayList(list, size))
        {
            MutableIntList result = new IntArrayList(size);
            return ArrayListIterate.collectIntFromInternalArray(list, intFunction, size, result);
        }
        return RandomAccessListIterate.collectInt(list, intFunction);
    }
View Full Code Here


     */
    public static <T> MutableIntCollection collectInt(
            Iterator<T> iterator,
            IntFunction<? super T> intFunction)
    {
        MutableIntCollection result = new IntArrayList();
        while (iterator.hasNext())
        {
            result.add(intFunction.intValueOf(iterator.next()));
        }
        return result;
    }
View Full Code Here

        return result;
    }

    public MutableIntList collectInt(IntFunction<? super T> intFunction)
    {
        IntArrayList result = new IntArrayList(this.size());
        this.forEach(new CollectIntProcedure<T>(intFunction, result));
        return result;
    }
View Full Code Here

        return result.toImmutable();
    }

    public ImmutableIntList collectInt(IntFunction<? super T> intFunction)
    {
        IntArrayList result = new IntArrayList(this.size());
        this.forEach(new CollectIntProcedure<T>(intFunction, result));
        return result.toImmutable();
    }
View Full Code Here

    }

    @Override
    public MutableIntList collectInt(IntFunction<? super T> intFunction)
    {
        IntArrayList result = new IntArrayList(this.size());
        this.forEach(new CollectIntProcedure<T>(intFunction, result));
        return result;
    }
View Full Code Here

        return this.collectFloat(floatFunction, new FloatArrayList());
    }

    public MutableIntList collectInt(IntFunction<? super T> intFunction)
    {
        return this.collectInt(intFunction, new IntArrayList());
    }
View Full Code Here

                : new IntArrayList().toImmutable();
    }

    public ImmutableIntList reject(IntPredicate predicate)
    {
        return predicate.accept(this.element1) ? new IntArrayList().toImmutable()
                : IntArrayList.newListWith(this.element1).toImmutable();
    }
View Full Code Here

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

    public ImmutableIntList newWithAll(IntIterable elements)
    {
        IntArrayList arrayList = IntArrayList.newListWith(this.element1);
        arrayList.addAll(elements);
        return arrayList.toImmutable();
    }
View Full Code Here

    {
        if (objectArray == null)
        {
            throw new IllegalArgumentException("Cannot perform a collectInt on null");
        }
        MutableIntList result = new IntArrayList(objectArray.length);
        for (T each : objectArray)
        {
            result.add(intFunction.intValueOf(each));
        }
        return result;
    }
View Full Code Here

     */
    public static <K, V> MutableIntCollection collectInt(
            Map<K, V> map,
            IntFunction<? super V> intFunction)
    {
        return collectInt(map, intFunction, new IntArrayList(map.size()));
    }
View Full Code Here

TOP

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

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.