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

public Class IntArrayList

extends AbstractIntIterable
implements MutableIntList, Externalizable
Class Inheritance
All Implemented Interfaces
java.io.Externalizable, java.io.Serializable, org.eclipse.collections.api.list.primitive.MutableIntList, org.eclipse.collections.api.list.primitive.IntList, org.eclipse.collections.api.ordered.primitive.ReversibleIntIterable, org.eclipse.collections.api.ordered.primitive.OrderedIntIterable, org.eclipse.collections.api.IntIterable, org.eclipse.collections.api.PrimitiveIterable, org.eclipse.collections.api.collection.primitive.MutableIntCollection
Imports
java.io.Externalizable, .IOException, .ObjectInput, .ObjectOutput, java.util.Arrays, .Collection, .Iterator, .NoSuchElementException, .Spliterator, .Spliterators, org.eclipse.collections.api.IntIterable, .LazyIntIterable, .RichIterable, org.eclipse.collections.api.block.comparator.primitive.IntComparator, org.eclipse.collections.api.block.function.primitive.ObjectIntIntToObjectFunction, .ObjectIntToObjectFunction, .IntToObjectFunction, org.eclipse.collections.api.block.predicate.primitive.IntPredicate, org.eclipse.collections.api.block.procedure.primitive.IntIntProcedure, .IntProcedure, org.eclipse.collections.api.collection.primitive.MutableIntCollection, org.eclipse.collections.api.factory.Lists, org.eclipse.collections.api.iterator.MutableIntIterator, .IntIterator, org.eclipse.collections.api.list.MutableList, org.eclipse.collections.api.list.primitive.IntList, .ImmutableIntList, .MutableIntList, org.eclipse.collections.api.set.primitive.IntSet, .MutableIntSet, org.eclipse.collections.api.stack.primitive.MutableIntStack, org.eclipse.collections.api.tuple.primitive.IntIntPair, .IntObjectPair, org.eclipse.collections.impl.factory.primitive.IntLists, .IntStacks, org.eclipse.collections.impl.lazy.primitive.ReverseIntIterable, org.eclipse.collections.impl.primitive.AbstractIntIterable, org.eclipse.collections.impl.set.mutable.primitive.IntHashSet, org.eclipse.collections.impl.tuple.primitive.PrimitiveTuples, org.eclipse.collections.impl.utility.Iterate, org.eclipse.collections.impl.utility.primitive.IntQuickSort

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.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class

Field Summary

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

Constructor Summary

AccessConstructor and Description
public
public
IntArrayList(int initialCapacity)

public
IntArrayList(int... 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, int element)

public boolean
allSatisfy(IntPredicate predicate)

Implements org.eclipse.collections.api.IntIterable.allSatisfy.

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

public boolean
anySatisfy(IntPredicate predicate)

Implements org.eclipse.collections.api.IntIterable.anySatisfy.

Returns true if any of the elements in the IntIterable 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 LazyIntIterable
public MutableIntList
public MutableIntList
public int
public MutableList<Integer>
private void
public RichIterable<IntIterable>
chunk(int size)

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

Partitions elements in fixed size chunks.

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

Implements org.eclipse.collections.api.list.primitive.MutableIntList.collect, org.eclipse.collections.api.IntIterable.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(IntToObjectFunction<? extends V> function, R target)

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

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

public boolean
contains(int value)

Implements org.eclipse.collections.api.IntIterable.contains.

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

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

private int[]
copyItemsWithNewCapacity(int newCapacity)

public int
count(IntPredicate predicate)

Implements org.eclipse.collections.api.IntIterable.count.

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

public int
public MutableIntList
public long
public void
each(IntProcedure procedure)

Implements org.eclipse.collections.api.IntIterable.each.

A synonym for forEach.

public void
ensureCapacity(int minCapacity)

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

Implements org.eclipse.collections.api.IntIterable.injectInto.

public <T> T
public MutableIntIterator
intIterator()

Implements org.eclipse.collections.api.collection.primitive.MutableIntCollection.intIterator, org.eclipse.collections.api.IntIterable.intIterator.

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

public int
public int
public int
public IntArrayList
newEmpty()

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

Creates a new empty IntArrayList.

private IndexOutOfBoundsException
public static IntArrayList
public static IntArrayList
newListWith(int... elements)

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

public static IntArrayList
newWithNValues(int size, int 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 IntArrayList
reject(IntPredicate predicate)

Implements org.eclipse.collections.api.list.primitive.MutableIntList.reject, org.eclipse.collections.api.IntIterable.reject.

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

public <R extends MutableIntCollection> R
reject(IntPredicate predicate, R target)

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

Same as reject(IntPredicate) , only the results are added to the target MutableIntCollection.

public boolean
public boolean
public boolean
public int
public boolean
public boolean
public boolean
public IntArrayList
public IntArrayList
select(IntPredicate predicate)

Implements org.eclipse.collections.api.list.primitive.MutableIntList.select, org.eclipse.collections.api.IntIterable.select.

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

public <R extends MutableIntCollection> R
select(IntPredicate predicate, R target)

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

Same as select(IntPredicate) , only the results are added to the target MutableIntCollection.

public int
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 IntArrayList
sortThis()

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

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

public IntArrayList
sortThis(IntComparator comparator)

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

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

public Spliterator.OfInt
public MutableIntList
public long
public void
swap(int index1, int index2)

Overrides default org.eclipse.collections.api.list.primitive.MutableIntList.swap.

private void
throwOutOfBounds(int index)

public int[]
toArray()

Implements org.eclipse.collections.api.IntIterable.toArray.

Converts the IntIterable to a primitive int array.

public int[]
toArray(int[] target)

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

Converts the IntIterable to a primitive int array.

public ImmutableIntList
toImmutable()

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

Returns an immutable copy of this list.

public IntArrayList
public MutableIntStack
toStack()

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

Converts the collection to a IntStack.

private void
public void
private void
wipeAndResetTheEnd(int newCurrentFilledIndex)

public IntArrayList
public IntArrayList
with(int element1, int element2)

public IntArrayList
with(int element1, int element2, int element3)

public IntArrayList
with(int element1, int element2, int element3, int... elements)

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

public IntArrayList
public IntArrayList
public static IntArrayList
wrapCopy(int... 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<IntObjectPair<T>>
zip(Iterable<T> iterable)

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

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

public MutableList<IntIntPair>
zipInt(IntIterable iterable)

Overrides default org.eclipse.collections.api.list.primitive.MutableIntList.zipInt.

Returns a MutableList formed from this MutableIntList and another IntList by combining corresponding elements in pairs.

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