Top Description Inners Fields Constructors Methods
org.eclipse.collections.impl.list.mutable.primitive

public Class LongArrayList

extends AbstractLongIterable
implements MutableLongList, Externalizable
Class Inheritance
All Implemented Interfaces
java.io.Externalizable, java.io.Serializable, org.eclipse.collections.api.list.primitive.MutableLongList, org.eclipse.collections.api.list.primitive.LongList, org.eclipse.collections.api.ordered.primitive.ReversibleLongIterable, org.eclipse.collections.api.ordered.primitive.OrderedLongIterable, org.eclipse.collections.api.LongIterable, org.eclipse.collections.api.PrimitiveIterable, org.eclipse.collections.api.collection.primitive.MutableLongCollection
Imports
java.io.Externalizable, .IOException, .ObjectInput, .ObjectOutput, java.util.Arrays, .Collection, .Iterator, .NoSuchElementException, .Spliterator, .Spliterators, org.eclipse.collections.api.LongIterable, .LazyLongIterable, .RichIterable, org.eclipse.collections.api.block.comparator.primitive.LongComparator, org.eclipse.collections.api.block.function.primitive.ObjectLongIntToObjectFunction, .ObjectLongToObjectFunction, .LongToObjectFunction, org.eclipse.collections.api.block.predicate.primitive.LongPredicate, org.eclipse.collections.api.block.procedure.primitive.LongIntProcedure, .LongProcedure, org.eclipse.collections.api.collection.primitive.MutableLongCollection, org.eclipse.collections.api.factory.Lists, org.eclipse.collections.api.iterator.MutableLongIterator, .LongIterator, org.eclipse.collections.api.list.MutableList, org.eclipse.collections.api.list.primitive.LongList, .ImmutableLongList, .MutableLongList, org.eclipse.collections.api.set.primitive.LongSet, .MutableLongSet, org.eclipse.collections.api.stack.primitive.MutableLongStack, org.eclipse.collections.api.tuple.primitive.LongLongPair, .LongObjectPair, org.eclipse.collections.impl.factory.primitive.LongLists, .LongStacks, org.eclipse.collections.impl.lazy.primitive.ReverseLongIterable, org.eclipse.collections.impl.primitive.AbstractLongIterable, org.eclipse.collections.impl.set.mutable.primitive.LongHashSet, org.eclipse.collections.impl.tuple.primitive.PrimitiveTuples, org.eclipse.collections.impl.utility.Iterate, org.eclipse.collections.impl.utility.primitive.LongQuickSort

LongArrayList is similar to FastList, and is memory-optimized for long primitives. This file was automatically generated from template file primitiveArrayList.stg.
Since
3.0.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class

Field Summary

Modifier and TypeField and Description
private static final long[]
protected transient long[]
private static final int
private static final long
protected int
private static final long[]

Constructor Summary

AccessConstructor and Description
public
public
LongArrayList(int initialCapacity)

public
LongArrayList(long... array)

Method Summary

Modifier and TypeMethod and Description
public boolean
public boolean
public boolean
public boolean
public boolean
public void
private void
addAtIndexLessThanSize(int index, long element)

public boolean
allSatisfy(LongPredicate predicate)

Implements org.eclipse.collections.api.LongIterable.allSatisfy.

Returns true if all of the elements in the LongIterable return true for the specified predicate, otherwise returns false.

public boolean
anySatisfy(LongPredicate predicate)

Implements org.eclipse.collections.api.LongIterable.anySatisfy.

Returns true if any of the elements in the LongIterable return true for the specified predicate, otherwise returns false.

public void
appendString(Appendable appendable, String start, String separator, String end)

Implements org.eclipse.collections.api.PrimitiveIterable.appendString.

Prints a string representation of this collection onto the given Appendable.

public LazyLongIterable
public MutableLongList
public MutableLongList
public int
public MutableList<Long>
private void
public RichIterable<LongIterable>
chunk(int size)

Overrides default org.eclipse.collections.api.LongIterable.chunk.

Partitions elements in fixed size chunks.

public void
public <V> MutableList<V>
collect(LongToObjectFunction<? extends V> function)

Implements org.eclipse.collections.api.list.primitive.MutableLongList.collect, org.eclipse.collections.api.LongIterable.collect.

Returns a new collection with the results of applying the specified function on each element of the source collection.

public <V, R extends Collection<V>> R
collect(LongToObjectFunction<? extends V> function, R target)

Overrides default org.eclipse.collections.api.LongIterable.collect.

Same as collect(LongToObjectFunction) , only the results are added to the target Collection.

public boolean
contains(long value)

Implements org.eclipse.collections.api.LongIterable.contains.

Returns true if the value is contained in the LongIterable, and false if it is not.

private void
copyItems(int sourceSize, long[] source)

private long[]
copyItemsWithNewCapacity(int newCapacity)

public int
count(LongPredicate predicate)

Implements org.eclipse.collections.api.LongIterable.count.

Returns a count of the number of elements in the LongIterable that return true for the specified predicate.

public long
public MutableLongList
public long
public void
each(LongProcedure procedure)

Implements org.eclipse.collections.api.LongIterable.each.

A synonym for forEach.

public void
ensureCapacity(int minCapacity)

private void
public boolean
public void
public long
public long
public long
public int
public int
public <T> T
injectInto(T injectedValue, ObjectLongToObjectFunction<? super T, ? extends T> function)

Implements org.eclipse.collections.api.LongIterable.injectInto.

public <T> T
public int
public MutableLongIterator
longIterator()

Implements org.eclipse.collections.api.collection.primitive.MutableLongCollection.longIterator, org.eclipse.collections.api.LongIterable.longIterator.

Returns a primitive iterator that can be used to iterate over the LongIterable in an imperative style.

public long
public long
public LongArrayList
newEmpty()

Overrides default org.eclipse.collections.api.list.primitive.MutableLongList.newEmpty.

Creates a new empty LongArrayList.

private IndexOutOfBoundsException
public static LongArrayList
public static LongArrayList
newListWith(long... elements)

Creates a new list using the passed elements argument as the backing store.

public static LongArrayList
newWithNValues(int size, long value)

public void
readExternal(ObjectInput in)

Implements java.io.Externalizable.readExternal.

The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays.

public LongArrayList
reject(LongPredicate predicate)

Implements org.eclipse.collections.api.list.primitive.MutableLongList.reject, org.eclipse.collections.api.LongIterable.reject.

Returns a new LongIterable with all of the elements in the LongIterable that return false for the specified predicate.

public <R extends MutableLongCollection> R
reject(LongPredicate predicate, R target)

Overrides default org.eclipse.collections.api.LongIterable.reject.

Same as reject(LongPredicate) , only the results are added to the target MutableLongCollection.

public boolean
public boolean
public boolean
public long
public boolean
public boolean
public boolean
public LongArrayList
public LongArrayList
select(LongPredicate predicate)

Implements org.eclipse.collections.api.list.primitive.MutableLongList.select, org.eclipse.collections.api.LongIterable.select.

Returns a new LongIterable with all of the elements in the LongIterable that return true for the specified predicate.

public <R extends MutableLongCollection> R
select(LongPredicate predicate, R target)

Overrides default org.eclipse.collections.api.LongIterable.select.

Same as select(LongPredicate) , only the results are added to the target MutableLongCollection.

public long
private void
shiftElementsAtIndex(int index, int sourceSize)

public int
size()

Implements org.eclipse.collections.api.PrimitiveIterable.size.

Returns the number of items in this iterable.

private int
sizePlusFiftyPercent(int oldSize)

public LongArrayList
sortThis()

Implements org.eclipse.collections.api.list.primitive.MutableLongList.sortThis.

Sorts this list mutating its contents and returns the same mutable list (this).

public LongArrayList
sortThis(LongComparator comparator)

Overrides default org.eclipse.collections.api.list.primitive.MutableLongList.sortThis.

Sorts the internal data structure of this list and returns the list itself as a convenience.

public Spliterator.OfLong
public MutableLongList
public long
public void
private void
throwOutOfBounds(int index)

public long[]
toArray()

Implements org.eclipse.collections.api.LongIterable.toArray.

Converts the LongIterable to a primitive long array.

public long[]
toArray(long[] target)

Overrides default org.eclipse.collections.api.LongIterable.toArray.

Converts the LongIterable to a primitive long array.

public ImmutableLongList
toImmutable()

Implements org.eclipse.collections.api.list.primitive.MutableLongList.toImmutable.

Returns an immutable copy of this list.

public LongArrayList
public MutableLongStack
toStack()

Overrides default org.eclipse.collections.api.ordered.primitive.OrderedLongIterable.toStack.

Converts the collection to a LongStack.

private void
public void
private void
wipeAndResetTheEnd(int newCurrentFilledIndex)

public LongArrayList
public LongArrayList
with(long element1, long element2)

public LongArrayList
with(long element1, long element2, long element3)

public LongArrayList
with(long element1, long element2, long element3, long... elements)

public LongArrayList
private LongArrayList
withArrayCopy(long[] elements, int begin, int length)

public LongArrayList
public LongArrayList
public static LongArrayList
wrapCopy(long... array)

Creates a new list by first copying the array passed in.

public void
writeExternal(ObjectOutput out)

Implements java.io.Externalizable.writeExternal.

The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays.

public <T> MutableList<LongObjectPair<T>>
zip(Iterable<T> iterable)

Overrides default org.eclipse.collections.api.list.primitive.MutableLongList.zip.

Returns a MutableList formed from this MutableLongList and a ListIterable by combining corresponding elements in pairs.

public MutableList<LongLongPair>
zipLong(LongIterable iterable)

Overrides default org.eclipse.collections.api.list.primitive.MutableLongList.zipLong.

Returns a MutableList formed from this MutableLongList and another LongList by combining corresponding elements in pairs.

Inherited from org.eclipse.collections.impl.primitive.AbstractLongIterable:
asLazyaveragemaxIfEmptymedianminIfEmptytoBagtoListtoSettoSortedArraytoSortedListtoString