Class LongArrayList
java.lang.Object
org.eclipse.collections.impl.primitive.AbstractLongIterable
org.eclipse.collections.impl.list.mutable.primitive.LongArrayList
- All Implemented Interfaces:
Externalizable,Serializable,MutableLongCollection,LongList,MutableLongList,LongIterable,OrderedLongIterable,ReversibleLongIterable,PrimitiveIterable
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.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(long newItem) booleanaddAll(long... source) booleanaddAll(LongIterable source) booleanaddAllAtIndex(int index, long... source) booleanaddAllAtIndex(int index, LongIterable source) voidaddAtIndex(int index, long element) booleanallSatisfy(LongPredicate predicate) booleananySatisfy(LongPredicate predicate) voidappendString(Appendable appendable, String start, String separator, String end) intbinarySearch(long value) boxed()chunk(int size) voidclear()<V> MutableList<V>collect(LongToObjectFunction<? extends V> function) <V,R extends Collection<V>>
Rcollect(LongToObjectFunction<? extends V> function, R target) booleancontains(long value) intcount(LongPredicate predicate) longdetectIfNone(LongPredicate predicate, long ifNone) distinct()longdotProduct(LongList list) voideach(LongProcedure procedure) voidensureCapacity(int minCapacity) booleanvoidforEachWithIndex(LongIntProcedure procedure) longget(int index) longgetFirst()longgetLast()inthashCode()intindexOf(long value) <T> TinjectInto(T injectedValue, ObjectLongToObjectFunction<? super T, ? extends T> function) <T> TinjectIntoWithIndex(T injectedValue, ObjectLongIntToObjectFunction<? super T, ? extends T> function) intlastIndexOf(long value) longmax()longmin()newEmpty()Creates a new empty LongArrayList.static LongArrayListnewList(LongIterable source) static LongArrayListnewListWith(long... elements) Creates a new list using the passedelementsargument as the backing store.static LongArrayListnewWithNValues(int size, long value) voidreject(LongPredicate predicate) <R extends MutableLongCollection>
Rreject(LongPredicate predicate, R target) booleanremove(long value) booleanremoveAll(long... source) booleanremoveAll(LongIterable source) longremoveAtIndex(int index) booleanremoveIf(LongPredicate predicate) booleanretainAll(long... source) booleanretainAll(LongIterable source) select(LongPredicate predicate) <R extends MutableLongCollection>
Rselect(LongPredicate predicate, R target) longset(int index, long element) intsize()sortThis()sortThis(LongComparator comparator) subList(int fromIndex, int toIndex) longsum()voidswap(int index1, int index2) long[]toArray()long[]toArray(long[] target) toStack()voidwith(long element) with(long element1, long element2) with(long element1, long element2, long element3) with(long element1, long element2, long element3, long... elements) withAll(LongIterable elements) without(long element) withoutAll(LongIterable elements) static LongArrayListwrapCopy(long... array) Creates a new list by first copying the array passed in.void<T> MutableList<LongObjectPair<T>>zipLong(LongIterable iterable) Methods inherited from class org.eclipse.collections.impl.primitive.AbstractLongIterable
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toStringMethods inherited from interface org.eclipse.collections.api.LongIterable
asLazy, average, averageIfEmpty, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, flatCollect, forEach, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, maxIfEmpty, median, medianIfEmpty, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, summaryStatistics, toBag, toList, toSet, toSortedArray, toSortedList, toSortedList, toSortedListBy, toSortedListByMethods inherited from interface org.eclipse.collections.api.list.primitive.LongList
forEachInBoth, primitiveParallelStream, primitiveStreamMethods inherited from interface org.eclipse.collections.api.list.primitive.MutableLongList
collectWithIndex, rejectWithIndex, selectWithIndex, shuffleThis, shuffleThis, sortThisBy, sortThisBy, tapMethods inherited from interface org.eclipse.collections.api.ordered.primitive.OrderedLongIterable
collectWithIndex, rejectWithIndex, selectWithIndexMethods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, toString
-
Constructor Details
-
LongArrayList
public LongArrayList() -
LongArrayList
public LongArrayList(int initialCapacity) -
LongArrayList
public LongArrayList(long... array)
-
-
Method Details
-
newListWith
Creates a new list using the passedelementsargument as the backing store.!!! WARNING: This method uses the passed in array, so can be very unsafe if the original array is held onto anywhere else. !!!
-
newList
-
newWithNValues
-
wrapCopy
Creates a new list by first copying the array passed in. -
size
public int size()- Specified by:
sizein interfacePrimitiveIterable
-
clear
public void clear()- Specified by:
clearin interfaceMutableLongCollection
-
contains
public boolean contains(long value) - Specified by:
containsin interfaceLongIterable
-
get
public long get(int index) -
getFirst
public long getFirst()- Specified by:
getFirstin interfaceOrderedLongIterable
-
getLast
public long getLast()- Specified by:
getLastin interfaceReversibleLongIterable
-
indexOf
public int indexOf(long value) - Specified by:
indexOfin interfaceOrderedLongIterable
-
lastIndexOf
public int lastIndexOf(long value) - Specified by:
lastIndexOfin interfaceLongList
-
trimToSize
public void trimToSize() -
ensureCapacity
public void ensureCapacity(int minCapacity) -
add
public boolean add(long newItem) - Specified by:
addin interfaceMutableLongCollection
-
addAll
public boolean addAll(long... source) - Specified by:
addAllin interfaceMutableLongCollection
-
addAll
- Specified by:
addAllin interfaceMutableLongCollection
-
addAtIndex
public void addAtIndex(int index, long element) - Specified by:
addAtIndexin interfaceMutableLongList
-
addAllAtIndex
public boolean addAllAtIndex(int index, long... source) - Specified by:
addAllAtIndexin interfaceMutableLongList
-
addAllAtIndex
- Specified by:
addAllAtIndexin interfaceMutableLongList
-
remove
public boolean remove(long value) - Specified by:
removein interfaceMutableLongCollection
-
removeIf
- Specified by:
removeIfin interfaceMutableLongCollection
-
removeAll
- Specified by:
removeAllin interfaceMutableLongCollection
-
removeAll
public boolean removeAll(long... source) - Specified by:
removeAllin interfaceMutableLongCollection
-
retainAll
- Specified by:
retainAllin interfaceMutableLongCollection
-
retainAll
public boolean retainAll(long... source) - Specified by:
retainAllin interfaceMutableLongCollection
-
removeAtIndex
public long removeAtIndex(int index) - Specified by:
removeAtIndexin interfaceMutableLongList
-
set
public long set(int index, long element) - Specified by:
setin interfaceMutableLongList
-
swap
public void swap(int index1, int index2) - Specified by:
swapin interfaceMutableLongList
-
with
- Specified by:
within interfaceMutableLongCollection- Specified by:
within interfaceMutableLongList
-
without
- Specified by:
withoutin interfaceMutableLongCollection- Specified by:
withoutin interfaceMutableLongList
-
withAll
- Specified by:
withAllin interfaceMutableLongCollection- Specified by:
withAllin interfaceMutableLongList
-
withoutAll
- Specified by:
withoutAllin interfaceMutableLongCollection- Specified by:
withoutAllin interfaceMutableLongList
-
with
-
with
-
with
-
longIterator
- Specified by:
longIteratorin interfaceLongIterable- Specified by:
longIteratorin interfaceMutableLongCollection
-
each
- Specified by:
eachin interfaceLongIterable- Since:
- 7.0.
-
forEachWithIndex
- Specified by:
forEachWithIndexin interfaceOrderedLongIterable
-
injectInto
public <T> T injectInto(T injectedValue, ObjectLongToObjectFunction<? super T, ? extends T> function) - Specified by:
injectIntoin interfaceLongIterable
-
injectIntoWithIndex
public <T> T injectIntoWithIndex(T injectedValue, ObjectLongIntToObjectFunction<? super T, ? extends T> function) - Specified by:
injectIntoWithIndexin interfaceOrderedLongIterable- Specified by:
injectIntoWithIndexin interfaceReversibleLongIterable
-
chunk
- Specified by:
chunkin interfaceLongIterable
-
count
- Specified by:
countin interfaceLongIterable
-
anySatisfy
- Specified by:
anySatisfyin interfaceLongIterable
-
allSatisfy
- Specified by:
allSatisfyin interfaceLongIterable
-
select
- Specified by:
selectin interfaceLongIterable- Specified by:
selectin interfaceLongList- Specified by:
selectin interfaceMutableLongCollection- Specified by:
selectin interfaceMutableLongList- Specified by:
selectin interfaceOrderedLongIterable- Specified by:
selectin interfaceReversibleLongIterable
-
select
- Specified by:
selectin interfaceLongIterable- Since:
- 8.1.
-
reject
- Specified by:
rejectin interfaceLongIterable- Specified by:
rejectin interfaceLongList- Specified by:
rejectin interfaceMutableLongCollection- Specified by:
rejectin interfaceMutableLongList- Specified by:
rejectin interfaceOrderedLongIterable- Specified by:
rejectin interfaceReversibleLongIterable
-
reject
- Specified by:
rejectin interfaceLongIterable- Since:
- 8.1.
-
detectIfNone
- Specified by:
detectIfNonein interfaceLongIterable
-
collect
- Specified by:
collectin interfaceLongIterable- Specified by:
collectin interfaceLongList- Specified by:
collectin interfaceMutableLongCollection- Specified by:
collectin interfaceMutableLongList- Specified by:
collectin interfaceOrderedLongIterable- Specified by:
collectin interfaceReversibleLongIterable
-
collect
- Specified by:
collectin interfaceLongIterable- Since:
- 8.1.
-
max
public long max()- Specified by:
maxin interfaceLongIterable
-
min
public long min()- Specified by:
minin interfaceLongIterable
-
sum
public long sum()- Specified by:
sumin interfaceLongIterable
-
dotProduct
- Specified by:
dotProductin interfaceLongList
-
toArray
public long[] toArray()- Specified by:
toArrayin interfaceLongIterable
-
toArray
public long[] toArray(long[] target) - Specified by:
toArrayin interfaceLongIterable
-
equals
-
hashCode
public int hashCode() -
appendString
- Specified by:
appendStringin interfacePrimitiveIterable
-
asUnmodifiable
- Specified by:
asUnmodifiablein interfaceMutableLongCollection- Specified by:
asUnmodifiablein interfaceMutableLongList
-
asSynchronized
- Specified by:
asSynchronizedin interfaceMutableLongCollection- Specified by:
asSynchronizedin interfaceMutableLongList
-
toImmutable
- Specified by:
toImmutablein interfaceLongList- Specified by:
toImmutablein interfaceMutableLongCollection- Specified by:
toImmutablein interfaceMutableLongList
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOException
-
asReversed
- Specified by:
asReversedin interfaceReversibleLongIterable
-
reverseThis
- Specified by:
reverseThisin interfaceMutableLongList
-
sortThis
- Specified by:
sortThisin interfaceMutableLongList
-
sortThis
- Specified by:
sortThisin interfaceMutableLongList
-
toReversed
- Specified by:
toReversedin interfaceLongList- Specified by:
toReversedin interfaceMutableLongList- Specified by:
toReversedin interfaceReversibleLongIterable
-
binarySearch
public int binarySearch(long value) - Specified by:
binarySearchin interfaceLongList
-
distinct
- Specified by:
distinctin interfaceLongList- Specified by:
distinctin interfaceMutableLongList- Specified by:
distinctin interfaceReversibleLongIterable
-
subList
- Specified by:
subListin interfaceLongList- Specified by:
subListin interfaceMutableLongList
-
zipLong
- Specified by:
zipLongin interfaceLongList- Specified by:
zipLongin interfaceMutableLongList- Since:
- 9.1.
-
newEmpty
Creates a new empty LongArrayList.- Specified by:
newEmptyin interfaceMutableLongCollection- Specified by:
newEmptyin interfaceMutableLongList- Since:
- 9.2.
-
zip
- Specified by:
zipin interfaceLongList- Specified by:
zipin interfaceMutableLongList- Since:
- 9.1.
-
boxed
- Specified by:
boxedin interfaceMutableLongList
-
toStack
- Specified by:
toStackin interfaceOrderedLongIterable
-
spliterator
- Specified by:
spliteratorin interfaceLongList
-