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

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


        return result.toImmutable();
    }

    public ImmutableLongList collectLong(LongFunction<? super T> longFunction)
    {
        LongArrayList result = new LongArrayList(this.size());
        this.forEach(new CollectLongProcedure<T>(longFunction, result));
        return result.toImmutable();
    }
View Full Code Here


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

    }

    @Override
    public MutableLongList collectLong(LongFunction<? super T> longFunction)
    {
        LongArrayList result = new LongArrayList(this.size());
        this.forEach(new CollectLongProcedure<T>(longFunction, result));
        return result;
    }
View Full Code Here

        return this.collectInt(intFunction, new IntArrayList());
    }

    public MutableLongList collectLong(LongFunction<? super T> longFunction)
    {
        return this.collectLong(longFunction, new LongArrayList());
    }
View Full Code Here

    }

    public ImmutableLongList select(LongPredicate predicate)
    {
        return predicate.accept(this.element1) ? LongArrayList.newListWith(this.element1).toImmutable()
                : new LongArrayList().toImmutable();
    }
View Full Code Here

                : new LongArrayList().toImmutable();
    }

    public ImmutableLongList reject(LongPredicate predicate)
    {
        return predicate.accept(this.element1) ? new LongArrayList().toImmutable()
                : LongArrayList.newListWith(this.element1).toImmutable();
    }
View Full Code Here

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

    public ImmutableLongList newWithAll(LongIterable elements)
    {
        LongArrayList arrayList = LongArrayList.newListWith(this.element1);
        arrayList.addAll(elements);
        return arrayList.toImmutable();
    }
View Full Code Here

        return true;
    }

    public ImmutableLongList select(LongPredicate predicate)
    {
        LongArrayList result = new LongArrayList();
        for (long item : this.items)
        {
            if (predicate.accept(item))
            {
                result.add(item);
            }
        }
        return result.toImmutable();
    }
View Full Code Here

        return result.toImmutable();
    }

    public ImmutableLongList reject(LongPredicate predicate)
    {
        LongArrayList result = new LongArrayList();
        for (long item : this.items)
        {
            if (!predicate.accept(item))
            {
                result.add(item);
            }
        }
        return result.toImmutable();
    }
View Full Code Here

    {
        if (objectArray == null)
        {
            throw new IllegalArgumentException("Cannot perform a collectLong on null");
        }
        MutableLongList result = new LongArrayList(objectArray.length);
        for (T each : objectArray)
        {
            result.add(longFunction.longValueOf(each));
        }
        return result;
    }
View Full Code Here

TOP

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

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.