Class IntArrayList
java.lang.Object
org.eclipse.collections.impl.primitive.AbstractIntIterable
org.eclipse.collections.impl.list.mutable.primitive.IntArrayList
- All Implemented Interfaces:
Externalizable,Serializable,MutableIntCollection,IntIterable,IntList,MutableIntList,OrderedIntIterable,ReversibleIntIterable,PrimitiveIterable
IntArrayList is similar to FastList, and is memory-optimized for int primitives.
This file was automatically generated from template file primitiveArrayList.stg.
- Since:
- 3.0.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(int newItem) booleanaddAll(int... source) booleanaddAll(IntIterable source) booleanaddAllAtIndex(int index, int... source) booleanaddAllAtIndex(int index, IntIterable source) voidaddAtIndex(int index, int element) booleanallSatisfy(IntPredicate predicate) booleananySatisfy(IntPredicate predicate) voidappendString(Appendable appendable, String start, String separator, String end) intbinarySearch(int value) boxed()chunk(int size) voidclear()<V> MutableList<V>collect(IntToObjectFunction<? extends V> function) <V,R extends Collection<V>>
Rcollect(IntToObjectFunction<? extends V> function, R target) booleancontains(int value) intcount(IntPredicate predicate) intdetectIfNone(IntPredicate predicate, int ifNone) distinct()longdotProduct(IntList list) voideach(IntProcedure procedure) voidensureCapacity(int minCapacity) booleanvoidforEachWithIndex(IntIntProcedure procedure) intget(int index) intgetFirst()intgetLast()inthashCode()intindexOf(int value) <T> TinjectInto(T injectedValue, ObjectIntToObjectFunction<? super T, ? extends T> function) <T> TinjectIntoWithIndex(T injectedValue, ObjectIntIntToObjectFunction<? super T, ? extends T> function) intlastIndexOf(int value) intmax()intmin()newEmpty()Creates a new empty IntArrayList.static IntArrayListnewList(IntIterable source) static IntArrayListnewListWith(int... elements) Creates a new list using the passedelementsargument as the backing store.static IntArrayListnewWithNValues(int size, int value) voidreject(IntPredicate predicate) <R extends MutableIntCollection>
Rreject(IntPredicate predicate, R target) booleanremove(int value) booleanremoveAll(int... source) booleanremoveAll(IntIterable source) intremoveAtIndex(int index) booleanremoveIf(IntPredicate predicate) booleanretainAll(int... source) booleanretainAll(IntIterable source) select(IntPredicate predicate) <R extends MutableIntCollection>
Rselect(IntPredicate predicate, R target) intset(int index, int element) intsize()sortThis()sortThis(IntComparator comparator) subList(int fromIndex, int toIndex) longsum()voidswap(int index1, int index2) int[]toArray()int[]toArray(int[] target) toStack()voidwith(int element) with(int element1, int element2) with(int element1, int element2, int element3) with(int element1, int element2, int element3, int... elements) withAll(IntIterable elements) without(int element) withoutAll(IntIterable elements) static IntArrayListwrapCopy(int... array) Creates a new list by first copying the array passed in.void<T> MutableList<IntObjectPair<T>>zipInt(IntIterable iterable) Methods inherited from class org.eclipse.collections.impl.primitive.AbstractIntIterable
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toStringMethods inherited from interface org.eclipse.collections.api.IntIterable
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.IntList
forEachInBoth, primitiveParallelStream, primitiveStreamMethods inherited from interface org.eclipse.collections.api.list.primitive.MutableIntList
collectWithIndex, rejectWithIndex, selectWithIndex, shuffleThis, shuffleThis, sortThisBy, sortThisBy, tapMethods inherited from interface org.eclipse.collections.api.ordered.primitive.OrderedIntIterable
collectWithIndex, rejectWithIndex, selectWithIndexMethods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, toString
-
Constructor Details
-
IntArrayList
public IntArrayList() -
IntArrayList
public IntArrayList(int initialCapacity) -
IntArrayList
public IntArrayList(int... 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 interfaceMutableIntCollection
-
contains
public boolean contains(int value) - Specified by:
containsin interfaceIntIterable
-
get
public int get(int index) -
getFirst
public int getFirst()- Specified by:
getFirstin interfaceOrderedIntIterable
-
getLast
public int getLast()- Specified by:
getLastin interfaceReversibleIntIterable
-
indexOf
public int indexOf(int value) - Specified by:
indexOfin interfaceOrderedIntIterable
-
lastIndexOf
public int lastIndexOf(int value) - Specified by:
lastIndexOfin interfaceIntList
-
trimToSize
public void trimToSize() -
ensureCapacity
public void ensureCapacity(int minCapacity) -
add
public boolean add(int newItem) - Specified by:
addin interfaceMutableIntCollection
-
addAll
public boolean addAll(int... source) - Specified by:
addAllin interfaceMutableIntCollection
-
addAll
- Specified by:
addAllin interfaceMutableIntCollection
-
addAtIndex
public void addAtIndex(int index, int element) - Specified by:
addAtIndexin interfaceMutableIntList
-
addAllAtIndex
public boolean addAllAtIndex(int index, int... source) - Specified by:
addAllAtIndexin interfaceMutableIntList
-
addAllAtIndex
- Specified by:
addAllAtIndexin interfaceMutableIntList
-
remove
public boolean remove(int value) - Specified by:
removein interfaceMutableIntCollection
-
removeIf
- Specified by:
removeIfin interfaceMutableIntCollection
-
removeAll
- Specified by:
removeAllin interfaceMutableIntCollection
-
removeAll
public boolean removeAll(int... source) - Specified by:
removeAllin interfaceMutableIntCollection
-
retainAll
- Specified by:
retainAllin interfaceMutableIntCollection
-
retainAll
public boolean retainAll(int... source) - Specified by:
retainAllin interfaceMutableIntCollection
-
removeAtIndex
public int removeAtIndex(int index) - Specified by:
removeAtIndexin interfaceMutableIntList
-
set
public int set(int index, int element) - Specified by:
setin interfaceMutableIntList
-
swap
public void swap(int index1, int index2) - Specified by:
swapin interfaceMutableIntList
-
with
- Specified by:
within interfaceMutableIntCollection- Specified by:
within interfaceMutableIntList
-
without
- Specified by:
withoutin interfaceMutableIntCollection- Specified by:
withoutin interfaceMutableIntList
-
withAll
- Specified by:
withAllin interfaceMutableIntCollection- Specified by:
withAllin interfaceMutableIntList
-
withoutAll
- Specified by:
withoutAllin interfaceMutableIntCollection- Specified by:
withoutAllin interfaceMutableIntList
-
with
-
with
-
with
-
intIterator
- Specified by:
intIteratorin interfaceIntIterable- Specified by:
intIteratorin interfaceMutableIntCollection
-
each
- Specified by:
eachin interfaceIntIterable- Since:
- 7.0.
-
forEachWithIndex
- Specified by:
forEachWithIndexin interfaceOrderedIntIterable
-
injectInto
- Specified by:
injectIntoin interfaceIntIterable
-
injectIntoWithIndex
public <T> T injectIntoWithIndex(T injectedValue, ObjectIntIntToObjectFunction<? super T, ? extends T> function) - Specified by:
injectIntoWithIndexin interfaceOrderedIntIterable- Specified by:
injectIntoWithIndexin interfaceReversibleIntIterable
-
chunk
- Specified by:
chunkin interfaceIntIterable
-
count
- Specified by:
countin interfaceIntIterable
-
anySatisfy
- Specified by:
anySatisfyin interfaceIntIterable
-
allSatisfy
- Specified by:
allSatisfyin interfaceIntIterable
-
select
- Specified by:
selectin interfaceIntIterable- Specified by:
selectin interfaceIntList- Specified by:
selectin interfaceMutableIntCollection- Specified by:
selectin interfaceMutableIntList- Specified by:
selectin interfaceOrderedIntIterable- Specified by:
selectin interfaceReversibleIntIterable
-
select
- Specified by:
selectin interfaceIntIterable- Since:
- 8.1.
-
reject
- Specified by:
rejectin interfaceIntIterable- Specified by:
rejectin interfaceIntList- Specified by:
rejectin interfaceMutableIntCollection- Specified by:
rejectin interfaceMutableIntList- Specified by:
rejectin interfaceOrderedIntIterable- Specified by:
rejectin interfaceReversibleIntIterable
-
reject
- Specified by:
rejectin interfaceIntIterable- Since:
- 8.1.
-
detectIfNone
- Specified by:
detectIfNonein interfaceIntIterable
-
collect
- Specified by:
collectin interfaceIntIterable- Specified by:
collectin interfaceIntList- Specified by:
collectin interfaceMutableIntCollection- Specified by:
collectin interfaceMutableIntList- Specified by:
collectin interfaceOrderedIntIterable- Specified by:
collectin interfaceReversibleIntIterable
-
collect
- Specified by:
collectin interfaceIntIterable- Since:
- 8.1.
-
max
public int max()- Specified by:
maxin interfaceIntIterable
-
min
public int min()- Specified by:
minin interfaceIntIterable
-
sum
public long sum()- Specified by:
sumin interfaceIntIterable
-
dotProduct
- Specified by:
dotProductin interfaceIntList
-
toArray
public int[] toArray()- Specified by:
toArrayin interfaceIntIterable
-
toArray
public int[] toArray(int[] target) - Specified by:
toArrayin interfaceIntIterable
-
equals
-
hashCode
public int hashCode() -
appendString
- Specified by:
appendStringin interfacePrimitiveIterable
-
asUnmodifiable
- Specified by:
asUnmodifiablein interfaceMutableIntCollection- Specified by:
asUnmodifiablein interfaceMutableIntList
-
asSynchronized
- Specified by:
asSynchronizedin interfaceMutableIntCollection- Specified by:
asSynchronizedin interfaceMutableIntList
-
toImmutable
- Specified by:
toImmutablein interfaceIntList- Specified by:
toImmutablein interfaceMutableIntCollection- Specified by:
toImmutablein interfaceMutableIntList
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOException
-
asReversed
- Specified by:
asReversedin interfaceReversibleIntIterable
-
reverseThis
- Specified by:
reverseThisin interfaceMutableIntList
-
sortThis
- Specified by:
sortThisin interfaceMutableIntList
-
sortThis
- Specified by:
sortThisin interfaceMutableIntList
-
toReversed
- Specified by:
toReversedin interfaceIntList- Specified by:
toReversedin interfaceMutableIntList- Specified by:
toReversedin interfaceReversibleIntIterable
-
binarySearch
public int binarySearch(int value) - Specified by:
binarySearchin interfaceIntList
-
distinct
- Specified by:
distinctin interfaceIntList- Specified by:
distinctin interfaceMutableIntList- Specified by:
distinctin interfaceReversibleIntIterable
-
subList
- Specified by:
subListin interfaceIntList- Specified by:
subListin interfaceMutableIntList
-
zipInt
- Specified by:
zipIntin interfaceIntList- Specified by:
zipIntin interfaceMutableIntList- Since:
- 9.1.
-
newEmpty
Creates a new empty IntArrayList.- Specified by:
newEmptyin interfaceMutableIntCollection- Specified by:
newEmptyin interfaceMutableIntList- Since:
- 9.2.
-
zip
- Specified by:
zipin interfaceIntList- Specified by:
zipin interfaceMutableIntList- Since:
- 9.1.
-
boxed
- Specified by:
boxedin interfaceMutableIntList
-
toStack
- Specified by:
toStackin interfaceOrderedIntIterable
-
spliterator
- Specified by:
spliteratorin interfaceIntList
-