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

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


        }

        public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
        {
            int size = in.readInt();
            LongArrayList deserializedDelegate = new LongArrayList(size);

            for (int i = 0; i < size; i++)
            {
                deserializedDelegate.add(in.readLong());
            }

            this.stack = ImmutableLongArrayStack.newStackFromTopToBottom(deserializedDelegate);
        }
View Full Code Here


        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

    private final LongArrayList delegate;

    private ImmutableLongArrayStack(long[] newElements)
    {
        this.checkOptimizedSize(newElements.length);
        this.delegate = new LongArrayList(newElements);
    }
View Full Code Here

        return new ImmutableLongArrayStack(LongArrayList.newList(items).reverseThis());
    }

    public ImmutableLongStack push(long item)
    {
        LongArrayList newDelegate = LongArrayList.newList(this.delegate);
        newDelegate.add(item);
        return new ImmutableLongArrayStack(newDelegate);
    }
View Full Code Here

        return Bags.immutable.of();
    }

    public MutableLongList toList()
    {
        return new LongArrayList();
    }
View Full Code Here

        return new long[0];
    }

    public MutableLongList toSortedList()
    {
        return new LongArrayList();
    }
View Full Code Here

    }

    @Override
    public MutableLongList collectLong(final LongFunction<? super T> longFunction)
    {
        final LongArrayList result = new LongArrayList(this.size());
        this.forEach(new Procedure<T>()
        {
            public void value(T each)
            {
                result.add(longFunction.longValueOf(each));
            }
        });
        return result;
    }
View Full Code Here

    }

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

        this.delegate = new LongArrayList(size);
    }

    private LongArrayStack(long... items)
    {
        this.delegate = new LongArrayList(items);
    }
View Full Code Here

    {
        this.checkPositiveValueForCount(count);
        this.checkSizeLessThanCount(count);
        if (count == 0)
        {
            return new LongArrayList(0);
        }
        MutableLongList subList = new LongArrayList(count);
        while (count > 0)
        {
            subList.add(this.pop());
            count--;
        }
        return subList;
    }
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.