@NotThreadSafe public class IntArrayList extends AbstractIntIterable implements MutableIntList, Externalizable
FastList
, and is memory-optimized for int primitives.
This file was automatically generated from template file primitiveArrayList.stg.Constructor and Description |
---|
IntArrayList() |
IntArrayList(int... array) |
IntArrayList(int initialCapacity) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(int newItem) |
boolean |
addAll(int... source) |
boolean |
addAll(IntIterable source) |
boolean |
addAllAtIndex(int index,
int... source) |
boolean |
addAllAtIndex(int index,
IntIterable source) |
void |
addAtIndex(int index,
int element) |
boolean |
allSatisfy(IntPredicate predicate) |
boolean |
anySatisfy(IntPredicate predicate) |
void |
appendString(Appendable appendable,
String start,
String separator,
String end)
Prints a string representation of this collection onto the given
Appendable . |
LazyIntIterable |
asReversed() |
MutableIntList |
asSynchronized() |
MutableIntList |
asUnmodifiable() |
int |
binarySearch(int value) |
void |
clear() |
<V> MutableList<V> |
collect(IntToObjectFunction<? extends V> function) |
boolean |
contains(int value) |
int |
count(IntPredicate predicate) |
int |
detectIfNone(IntPredicate predicate,
int ifNone) |
MutableIntList |
distinct() |
long |
dotProduct(IntList list) |
void |
each(IntProcedure procedure) |
void |
ensureCapacity(int minCapacity) |
boolean |
equals(Object otherList)
Follows the same general contract as
List.equals(Object) . |
void |
forEach(IntProcedure procedure) |
void |
forEachWithIndex(IntIntProcedure procedure) |
int |
get(int index) |
int |
getFirst() |
int |
getLast() |
int |
hashCode()
Follows the same general contract as
List.hashCode() . |
int |
indexOf(int value) |
<T> T |
injectInto(T injectedValue,
ObjectIntToObjectFunction<? super T,? extends T> function) |
<T> T |
injectIntoWithIndex(T injectedValue,
ObjectIntIntToObjectFunction<? super T,? extends T> function) |
MutableIntIterator |
intIterator() |
int |
lastIndexOf(int value) |
int |
max() |
int |
min() |
static IntArrayList |
newList(IntIterable source) |
static IntArrayList |
newListWith(int... elements)
Creates a new list using the passed
elements argument as the backing store. |
static IntArrayList |
newWithNValues(int size,
int value) |
boolean |
noneSatisfy(IntPredicate predicate) |
void |
readExternal(ObjectInput in) |
IntArrayList |
reject(IntPredicate predicate) |
boolean |
remove(int value) |
boolean |
removeAll(int... source) |
boolean |
removeAll(IntIterable source) |
int |
removeAtIndex(int index) |
boolean |
retainAll(int... source) |
boolean |
retainAll(IntIterable source) |
IntArrayList |
reverseThis() |
IntArrayList |
select(IntPredicate predicate) |
int |
set(int index,
int element) |
int |
size()
Returns the number of items in this iterable.
|
IntArrayList |
sortThis()
Sorts this list mutating its contents and returns the same mutable list (this).
|
MutableIntList |
subList(int fromIndex,
int toIndex) |
long |
sum() |
int[] |
toArray() |
ImmutableIntList |
toImmutable()
Returns an immutable copy of this list.
|
IntArrayList |
toReversed() |
void |
trimToSize() |
IntArrayList |
with(int element) |
IntArrayList |
with(int element1,
int element2) |
IntArrayList |
with(int element1,
int element2,
int element3) |
IntArrayList |
with(int element1,
int element2,
int element3,
int... elements) |
IntArrayList |
withAll(IntIterable elements) |
IntArrayList |
without(int element) |
IntArrayList |
withoutAll(IntIterable elements) |
void |
writeExternal(ObjectOutput out) |
asLazy, average, containsAll, containsAll, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toString
asLazy, average, containsAll, containsAll, maxIfEmpty, median, minIfEmpty, summaryStatistics, toBag, toList, toSet, toSortedArray, toSortedList
appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, toString
public IntArrayList()
public IntArrayList(int initialCapacity)
public IntArrayList(int... array)
public static IntArrayList newListWith(int... elements)
elements
argument 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. !!!
public static IntArrayList newList(IntIterable source)
public static IntArrayList newWithNValues(int size, int value)
public int size()
PrimitiveIterable
size
in interface PrimitiveIterable
public void clear()
clear
in interface MutableIntCollection
public boolean contains(int value)
contains
in interface IntIterable
public int getFirst()
getFirst
in interface OrderedIntIterable
public int getLast()
getLast
in interface ReversibleIntIterable
public int indexOf(int value)
indexOf
in interface OrderedIntIterable
public int lastIndexOf(int value)
lastIndexOf
in interface IntList
public void trimToSize()
public void ensureCapacity(int minCapacity)
public boolean add(int newItem)
add
in interface MutableIntCollection
public boolean addAll(int... source)
addAll
in interface MutableIntCollection
public boolean addAll(IntIterable source)
addAll
in interface MutableIntCollection
public void addAtIndex(int index, int element)
addAtIndex
in interface MutableIntList
public boolean addAllAtIndex(int index, int... source)
addAllAtIndex
in interface MutableIntList
public boolean addAllAtIndex(int index, IntIterable source)
addAllAtIndex
in interface MutableIntList
public boolean remove(int value)
remove
in interface MutableIntCollection
public boolean removeAll(IntIterable source)
removeAll
in interface MutableIntCollection
public boolean removeAll(int... source)
removeAll
in interface MutableIntCollection
public boolean retainAll(IntIterable source)
retainAll
in interface MutableIntCollection
Collection.retainAll(Collection)
public boolean retainAll(int... source)
retainAll
in interface MutableIntCollection
Collection.retainAll(Collection)
public int removeAtIndex(int index)
removeAtIndex
in interface MutableIntList
public int set(int index, int element)
set
in interface MutableIntList
public IntArrayList with(int element)
with
in interface MutableIntCollection
with
in interface MutableIntList
public IntArrayList without(int element)
without
in interface MutableIntCollection
without
in interface MutableIntList
public IntArrayList withAll(IntIterable elements)
withAll
in interface MutableIntCollection
withAll
in interface MutableIntList
public IntArrayList withoutAll(IntIterable elements)
withoutAll
in interface MutableIntCollection
withoutAll
in interface MutableIntList
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 MutableIntIterator intIterator()
intIterator
in interface MutableIntCollection
intIterator
in interface IntIterable
public void forEach(IntProcedure procedure)
forEach
in interface IntIterable
public void each(IntProcedure procedure)
each
in interface IntIterable
public void forEachWithIndex(IntIntProcedure procedure)
forEachWithIndex
in interface OrderedIntIterable
public <T> T injectInto(T injectedValue, ObjectIntToObjectFunction<? super T,? extends T> function)
injectInto
in interface IntIterable
public <T> T injectIntoWithIndex(T injectedValue, ObjectIntIntToObjectFunction<? super T,? extends T> function)
injectIntoWithIndex
in interface OrderedIntIterable
injectIntoWithIndex
in interface ReversibleIntIterable
public int count(IntPredicate predicate)
count
in interface IntIterable
public boolean anySatisfy(IntPredicate predicate)
anySatisfy
in interface IntIterable
public boolean allSatisfy(IntPredicate predicate)
allSatisfy
in interface IntIterable
public boolean noneSatisfy(IntPredicate predicate)
noneSatisfy
in interface IntIterable
public IntArrayList select(IntPredicate predicate)
select
in interface MutableIntCollection
select
in interface IntIterable
select
in interface IntList
select
in interface MutableIntList
select
in interface OrderedIntIterable
select
in interface ReversibleIntIterable
public IntArrayList reject(IntPredicate predicate)
reject
in interface MutableIntCollection
reject
in interface IntIterable
reject
in interface IntList
reject
in interface MutableIntList
reject
in interface OrderedIntIterable
reject
in interface ReversibleIntIterable
public int detectIfNone(IntPredicate predicate, int ifNone)
detectIfNone
in interface IntIterable
public <V> MutableList<V> collect(IntToObjectFunction<? extends V> function)
collect
in interface MutableIntCollection
collect
in interface IntIterable
collect
in interface IntList
collect
in interface MutableIntList
collect
in interface OrderedIntIterable
collect
in interface ReversibleIntIterable
public int max()
max
in interface IntIterable
public int min()
min
in interface IntIterable
public long sum()
sum
in interface IntIterable
public long dotProduct(IntList list)
dotProduct
in interface IntList
public int[] toArray()
toArray
in interface IntIterable
public boolean equals(Object otherList)
IntList
List.equals(Object)
.public int hashCode()
IntList
List.hashCode()
.public void appendString(Appendable appendable, String start, String separator, String end)
PrimitiveIterable
Appendable
. Prints the string returned
by PrimitiveIterable.makeString(String, String, String)
.appendString
in interface PrimitiveIterable
public MutableIntList asUnmodifiable()
asUnmodifiable
in interface MutableIntCollection
asUnmodifiable
in interface MutableIntList
public MutableIntList asSynchronized()
asSynchronized
in interface MutableIntCollection
asSynchronized
in interface MutableIntList
public ImmutableIntList toImmutable()
MutableIntList
toImmutable
in interface MutableIntCollection
toImmutable
in interface IntList
toImmutable
in interface MutableIntList
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException
readExternal
in interface Externalizable
IOException
public LazyIntIterable asReversed()
asReversed
in interface ReversibleIntIterable
public IntArrayList reverseThis()
reverseThis
in interface MutableIntList
public IntArrayList sortThis()
MutableIntList
sortThis
in interface MutableIntList
public IntArrayList toReversed()
toReversed
in interface IntList
toReversed
in interface MutableIntList
toReversed
in interface ReversibleIntIterable
public int binarySearch(int value)
binarySearch
in interface IntList
public MutableIntList distinct()
distinct
in interface IntList
distinct
in interface MutableIntList
distinct
in interface ReversibleIntIterable
public MutableIntList subList(int fromIndex, int toIndex)
subList
in interface IntList
subList
in interface MutableIntList
List#subList(int fromIndex, int toIndex)}
Copyright © 2004–2016. All rights reserved.