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

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


            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


    {
        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

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

    public MutableIntList toList()
    {
        final MutableIntList list = new IntArrayList();
        this.forEach(new IntProcedure()
        {
            public void value(int each)
            {
                list.add(each);
            }
        });
        return list;
    }
View Full Code Here

        return new ImmutableIntArrayList(newItems);
    }

    public ImmutableIntList newWithoutAll(IntIterable elements)
    {
        MutableIntList mutableIntList = this.toList();
        mutableIntList.removeAll(elements);
        return mutableIntList.toImmutable();
    }
View Full Code Here

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

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

        this.checkSizeLessThanCount(count);
        if (count == 0)
        {
            return new IntArrayList(0);
        }
        MutableIntList subList = new IntArrayList(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 MutableIntList toList()
    {
        MutableIntList result = new IntArrayList(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.MutableIntList

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.