public class IntArrayList extends AbstractIntIterable implements MutableIntList, Externalizable
| 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) |
LazyIntIterable |
asReversed() |
MutableIntList |
asSynchronized() |
MutableIntList |
asUnmodifiable() |
int |
binarySearch(int value) |
RichIterable<IntIterable> |
chunk(int size) |
void |
clear() |
<V> MutableList<V> |
collect(IntToObjectFunction<? extends V> function) |
<V,R extends Collection<V>> |
collect(IntToObjectFunction<? extends V> function,
R target) |
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) |
void |
forEachWithIndex(IntIntProcedure procedure) |
int |
get(int index) |
int |
getFirst() |
int |
getLast() |
int |
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() |
IntArrayList |
newEmpty()
Creates a new empty IntArrayList.
|
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) |
void |
readExternal(ObjectInput in) |
IntArrayList |
reject(IntPredicate predicate) |
<R extends MutableIntCollection> |
reject(IntPredicate predicate,
R target) |
boolean |
remove(int value) |
boolean |
removeAll(int... source) |
boolean |
removeAll(IntIterable source) |
int |
removeAtIndex(int index) |
boolean |
removeIf(IntPredicate predicate) |
boolean |
retainAll(int... source) |
boolean |
retainAll(IntIterable source) |
IntArrayList |
reverseThis() |
IntArrayList |
select(IntPredicate predicate) |
<R extends MutableIntCollection> |
select(IntPredicate predicate,
R target) |
int |
set(int index,
int element) |
int |
size() |
IntArrayList |
sortThis() |
IntArrayList |
sortThis(IntComparator comparator) |
Spliterator.OfInt |
spliterator() |
MutableIntList |
subList(int fromIndex,
int toIndex) |
long |
sum() |
void |
swap(int index1,
int index2) |
int[] |
toArray() |
int[] |
toArray(int[] target) |
ImmutableIntList |
toImmutable() |
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) |
static IntArrayList |
wrapCopy(int... array)
Creates a new list by first copying the array passed in.
|
void |
writeExternal(ObjectOutput out) |
<T> MutableList<IntObjectPair<T>> |
zip(Iterable<T> iterable) |
MutableList<IntIntPair> |
zipInt(IntIterable iterable) |
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toStringcollectWithIndex, rejectWithIndex, selectWithIndex, shuffleThis, shuffleThis, sortThisBy, sortThisBy, tapforEachInBoth, primitiveParallelStream, primitiveStreamcollectWithIndex, rejectWithIndex, selectWithIndexasLazy, 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, toSortedListByappendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, toStringpublic 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 static IntArrayList wrapCopy(int... array)
public int size()
size in interface PrimitiveIterablepublic void clear()
clear in interface MutableIntCollectionpublic boolean contains(int value)
contains in interface IntIterablepublic int getFirst()
getFirst in interface OrderedIntIterablepublic int getLast()
getLast in interface ReversibleIntIterablepublic int indexOf(int value)
indexOf in interface OrderedIntIterablepublic int lastIndexOf(int value)
lastIndexOf in interface IntListpublic void trimToSize()
public void ensureCapacity(int minCapacity)
public boolean add(int newItem)
add in interface MutableIntCollectionpublic boolean addAll(int... source)
addAll in interface MutableIntCollectionpublic boolean addAll(IntIterable source)
addAll in interface MutableIntCollectionpublic void addAtIndex(int index,
int element)
addAtIndex in interface MutableIntListpublic boolean addAllAtIndex(int index,
int... source)
addAllAtIndex in interface MutableIntListpublic boolean addAllAtIndex(int index,
IntIterable source)
addAllAtIndex in interface MutableIntListpublic boolean remove(int value)
remove in interface MutableIntCollectionpublic boolean removeIf(IntPredicate predicate)
removeIf in interface MutableIntCollectionpublic boolean removeAll(IntIterable source)
removeAll in interface MutableIntCollectionpublic boolean removeAll(int... source)
removeAll in interface MutableIntCollectionpublic boolean retainAll(IntIterable source)
retainAll in interface MutableIntCollectionpublic boolean retainAll(int... source)
retainAll in interface MutableIntCollectionpublic int removeAtIndex(int index)
removeAtIndex in interface MutableIntListpublic int set(int index,
int element)
set in interface MutableIntListpublic void swap(int index1,
int index2)
swap in interface MutableIntListpublic IntArrayList with(int element)
with in interface MutableIntCollectionwith in interface MutableIntListpublic IntArrayList without(int element)
without in interface MutableIntCollectionwithout in interface MutableIntListpublic IntArrayList withAll(IntIterable elements)
withAll in interface MutableIntCollectionwithAll in interface MutableIntListpublic IntArrayList withoutAll(IntIterable elements)
withoutAll in interface MutableIntCollectionwithoutAll in interface MutableIntListpublic 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 MutableIntCollectionintIterator in interface IntIterablepublic void each(IntProcedure procedure)
each in interface IntIterablepublic void forEachWithIndex(IntIntProcedure procedure)
forEachWithIndex in interface OrderedIntIterablepublic <T> T injectInto(T injectedValue,
ObjectIntToObjectFunction<? super T,? extends T> function)
injectInto in interface IntIterablepublic <T> T injectIntoWithIndex(T injectedValue,
ObjectIntIntToObjectFunction<? super T,? extends T> function)
injectIntoWithIndex in interface OrderedIntIterableinjectIntoWithIndex in interface ReversibleIntIterablepublic RichIterable<IntIterable> chunk(int size)
chunk in interface IntIterablepublic int count(IntPredicate predicate)
count in interface IntIterablepublic boolean anySatisfy(IntPredicate predicate)
anySatisfy in interface IntIterablepublic boolean allSatisfy(IntPredicate predicate)
allSatisfy in interface IntIterablepublic IntArrayList select(IntPredicate predicate)
select in interface MutableIntCollectionselect in interface IntIterableselect in interface IntListselect in interface MutableIntListselect in interface OrderedIntIterableselect in interface ReversibleIntIterablepublic <R extends MutableIntCollection> R select(IntPredicate predicate, R target)
select in interface IntIterablepublic IntArrayList reject(IntPredicate predicate)
reject in interface MutableIntCollectionreject in interface IntIterablereject in interface IntListreject in interface MutableIntListreject in interface OrderedIntIterablereject in interface ReversibleIntIterablepublic <R extends MutableIntCollection> R reject(IntPredicate predicate, R target)
reject in interface IntIterablepublic int detectIfNone(IntPredicate predicate, int ifNone)
detectIfNone in interface IntIterablepublic <V> MutableList<V> collect(IntToObjectFunction<? extends V> function)
collect in interface MutableIntCollectioncollect in interface IntIterablecollect in interface IntListcollect in interface MutableIntListcollect in interface OrderedIntIterablecollect in interface ReversibleIntIterablepublic <V,R extends Collection<V>> R collect(IntToObjectFunction<? extends V> function, R target)
collect in interface IntIterablepublic int max()
max in interface IntIterablepublic int min()
min in interface IntIterablepublic long sum()
sum in interface IntIterablepublic long dotProduct(IntList list)
dotProduct in interface IntListpublic int[] toArray()
toArray in interface IntIterablepublic int[] toArray(int[] target)
toArray in interface IntIterablepublic boolean equals(Object otherList)
public int hashCode()
public void appendString(Appendable appendable, String start, String separator, String end)
appendString in interface PrimitiveIterablepublic MutableIntList asUnmodifiable()
asUnmodifiable in interface MutableIntCollectionasUnmodifiable in interface MutableIntListpublic MutableIntList asSynchronized()
asSynchronized in interface MutableIntCollectionasSynchronized in interface MutableIntListpublic ImmutableIntList toImmutable()
toImmutable in interface MutableIntCollectiontoImmutable in interface IntListtoImmutable in interface MutableIntListpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException
readExternal in interface ExternalizableIOExceptionpublic LazyIntIterable asReversed()
asReversed in interface ReversibleIntIterablepublic IntArrayList reverseThis()
reverseThis in interface MutableIntListpublic IntArrayList sortThis()
sortThis in interface MutableIntListpublic IntArrayList sortThis(IntComparator comparator)
sortThis in interface MutableIntListpublic IntArrayList toReversed()
toReversed in interface IntListtoReversed in interface MutableIntListtoReversed in interface ReversibleIntIterablepublic int binarySearch(int value)
binarySearch in interface IntListpublic MutableIntList distinct()
distinct in interface IntListdistinct in interface MutableIntListdistinct in interface ReversibleIntIterablepublic MutableIntList subList(int fromIndex, int toIndex)
subList in interface IntListsubList in interface MutableIntListpublic MutableList<IntIntPair> zipInt(IntIterable iterable)
zipInt in interface IntListzipInt in interface MutableIntListpublic IntArrayList newEmpty()
newEmpty in interface MutableIntCollectionnewEmpty in interface MutableIntListpublic <T> MutableList<IntObjectPair<T>> zip(Iterable<T> iterable)
zip in interface IntListzip in interface MutableIntListpublic Spliterator.OfInt spliterator()
spliterator in interface IntListCopyright © 2004–2022. All rights reserved.