public class ShortArrayList extends AbstractShortIterable implements MutableShortList, Externalizable
| Constructor and Description |
|---|
ShortArrayList() |
ShortArrayList(int initialCapacity) |
ShortArrayList(short... array) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(short newItem) |
boolean |
addAll(short... source) |
boolean |
addAll(ShortIterable source) |
boolean |
addAllAtIndex(int index,
short... source) |
boolean |
addAllAtIndex(int index,
ShortIterable source) |
void |
addAtIndex(int index,
short element) |
boolean |
allSatisfy(ShortPredicate predicate) |
boolean |
anySatisfy(ShortPredicate predicate) |
void |
appendString(Appendable appendable,
String start,
String separator,
String end) |
LazyShortIterable |
asReversed() |
MutableShortList |
asSynchronized() |
MutableShortList |
asUnmodifiable() |
int |
binarySearch(short value) |
RichIterable<ShortIterable> |
chunk(int size) |
void |
clear() |
<V> MutableList<V> |
collect(ShortToObjectFunction<? extends V> function) |
<V,R extends Collection<V>> |
collect(ShortToObjectFunction<? extends V> function,
R target) |
boolean |
contains(short value) |
int |
count(ShortPredicate predicate) |
short |
detectIfNone(ShortPredicate predicate,
short ifNone) |
MutableShortList |
distinct() |
long |
dotProduct(ShortList list) |
void |
each(ShortProcedure procedure) |
void |
ensureCapacity(int minCapacity) |
boolean |
equals(Object otherList) |
void |
forEachWithIndex(ShortIntProcedure procedure) |
short |
get(int index) |
short |
getFirst() |
short |
getLast() |
int |
hashCode() |
int |
indexOf(short value) |
<T> T |
injectInto(T injectedValue,
ObjectShortToObjectFunction<? super T,? extends T> function) |
<T> T |
injectIntoWithIndex(T injectedValue,
ObjectShortIntToObjectFunction<? super T,? extends T> function) |
int |
lastIndexOf(short value) |
short |
max() |
short |
min() |
ShortArrayList |
newEmpty()
Creates a new empty ShortArrayList.
|
static ShortArrayList |
newList(ShortIterable source) |
static ShortArrayList |
newListWith(short... elements)
Creates a new list using the passed
elements argument as the backing store. |
static ShortArrayList |
newWithNValues(int size,
short value) |
void |
readExternal(ObjectInput in) |
ShortArrayList |
reject(ShortPredicate predicate) |
<R extends MutableShortCollection> |
reject(ShortPredicate predicate,
R target) |
boolean |
remove(short value) |
boolean |
removeAll(short... source) |
boolean |
removeAll(ShortIterable source) |
short |
removeAtIndex(int index) |
boolean |
removeIf(ShortPredicate predicate) |
boolean |
retainAll(short... source) |
boolean |
retainAll(ShortIterable source) |
ShortArrayList |
reverseThis() |
ShortArrayList |
select(ShortPredicate predicate) |
<R extends MutableShortCollection> |
select(ShortPredicate predicate,
R target) |
short |
set(int index,
short element) |
MutableShortIterator |
shortIterator() |
int |
size() |
ShortArrayList |
sortThis() |
ShortArrayList |
sortThis(ShortComparator comparator) |
MutableShortList |
subList(int fromIndex,
int toIndex) |
long |
sum() |
void |
swap(int index1,
int index2) |
short[] |
toArray() |
short[] |
toArray(short[] target) |
ImmutableShortList |
toImmutable() |
ShortArrayList |
toReversed() |
void |
trimToSize() |
ShortArrayList |
with(short element) |
ShortArrayList |
with(short element1,
short element2) |
ShortArrayList |
with(short element1,
short element2,
short element3) |
ShortArrayList |
with(short element1,
short element2,
short element3,
short... elements) |
ShortArrayList |
withAll(ShortIterable elements) |
ShortArrayList |
without(short element) |
ShortArrayList |
withoutAll(ShortIterable elements) |
static ShortArrayList |
wrapCopy(short... array)
Creates a new list by first copying the array passed in.
|
void |
writeExternal(ObjectOutput out) |
<T> MutableList<ShortObjectPair<T>> |
zip(Iterable<T> iterable) |
MutableList<ShortShortPair> |
zipShort(ShortIterable iterable) |
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toStringcollectWithIndex, rejectWithIndex, selectWithIndex, shuffleThis, shuffleThis, sortThisBy, sortThisBy, tapforEachInBothcollectWithIndex, 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 ShortArrayList()
public ShortArrayList(int initialCapacity)
public ShortArrayList(short... array)
public static ShortArrayList newListWith(short... 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 ShortArrayList newList(ShortIterable source)
public static ShortArrayList newWithNValues(int size, short value)
public static ShortArrayList wrapCopy(short... array)
public int size()
size in interface PrimitiveIterablepublic void clear()
clear in interface MutableShortCollectionpublic boolean contains(short value)
contains in interface ShortIterablepublic short getFirst()
getFirst in interface OrderedShortIterablepublic short getLast()
getLast in interface ReversibleShortIterablepublic int indexOf(short value)
indexOf in interface OrderedShortIterablepublic int lastIndexOf(short value)
lastIndexOf in interface ShortListpublic void trimToSize()
public void ensureCapacity(int minCapacity)
public boolean add(short newItem)
add in interface MutableShortCollectionpublic boolean addAll(short... source)
addAll in interface MutableShortCollectionpublic boolean addAll(ShortIterable source)
addAll in interface MutableShortCollectionpublic void addAtIndex(int index,
short element)
addAtIndex in interface MutableShortListpublic boolean addAllAtIndex(int index,
short... source)
addAllAtIndex in interface MutableShortListpublic boolean addAllAtIndex(int index,
ShortIterable source)
addAllAtIndex in interface MutableShortListpublic boolean remove(short value)
remove in interface MutableShortCollectionpublic boolean removeIf(ShortPredicate predicate)
removeIf in interface MutableShortCollectionpublic boolean removeAll(ShortIterable source)
removeAll in interface MutableShortCollectionpublic boolean removeAll(short... source)
removeAll in interface MutableShortCollectionpublic boolean retainAll(ShortIterable source)
retainAll in interface MutableShortCollectionpublic boolean retainAll(short... source)
retainAll in interface MutableShortCollectionpublic short removeAtIndex(int index)
removeAtIndex in interface MutableShortListpublic short set(int index,
short element)
set in interface MutableShortListpublic void swap(int index1,
int index2)
swap in interface MutableShortListpublic ShortArrayList with(short element)
with in interface MutableShortCollectionwith in interface MutableShortListpublic ShortArrayList without(short element)
without in interface MutableShortCollectionwithout in interface MutableShortListpublic ShortArrayList withAll(ShortIterable elements)
withAll in interface MutableShortCollectionwithAll in interface MutableShortListpublic ShortArrayList withoutAll(ShortIterable elements)
withoutAll in interface MutableShortCollectionwithoutAll in interface MutableShortListpublic ShortArrayList with(short element1, short element2)
public ShortArrayList with(short element1, short element2, short element3)
public ShortArrayList with(short element1, short element2, short element3, short... elements)
public MutableShortIterator shortIterator()
shortIterator in interface MutableShortCollectionshortIterator in interface ShortIterablepublic void each(ShortProcedure procedure)
each in interface ShortIterablepublic void forEachWithIndex(ShortIntProcedure procedure)
forEachWithIndex in interface OrderedShortIterablepublic <T> T injectInto(T injectedValue,
ObjectShortToObjectFunction<? super T,? extends T> function)
injectInto in interface ShortIterablepublic <T> T injectIntoWithIndex(T injectedValue,
ObjectShortIntToObjectFunction<? super T,? extends T> function)
injectIntoWithIndex in interface OrderedShortIterableinjectIntoWithIndex in interface ReversibleShortIterablepublic RichIterable<ShortIterable> chunk(int size)
chunk in interface ShortIterablepublic int count(ShortPredicate predicate)
count in interface ShortIterablepublic boolean anySatisfy(ShortPredicate predicate)
anySatisfy in interface ShortIterablepublic boolean allSatisfy(ShortPredicate predicate)
allSatisfy in interface ShortIterablepublic ShortArrayList select(ShortPredicate predicate)
select in interface MutableShortCollectionselect in interface MutableShortListselect in interface ShortListselect in interface OrderedShortIterableselect in interface ReversibleShortIterableselect in interface ShortIterablepublic <R extends MutableShortCollection> R select(ShortPredicate predicate, R target)
select in interface ShortIterablepublic ShortArrayList reject(ShortPredicate predicate)
reject in interface MutableShortCollectionreject in interface MutableShortListreject in interface ShortListreject in interface OrderedShortIterablereject in interface ReversibleShortIterablereject in interface ShortIterablepublic <R extends MutableShortCollection> R reject(ShortPredicate predicate, R target)
reject in interface ShortIterablepublic short detectIfNone(ShortPredicate predicate, short ifNone)
detectIfNone in interface ShortIterablepublic <V> MutableList<V> collect(ShortToObjectFunction<? extends V> function)
collect in interface MutableShortCollectioncollect in interface MutableShortListcollect in interface ShortListcollect in interface OrderedShortIterablecollect in interface ReversibleShortIterablecollect in interface ShortIterablepublic <V,R extends Collection<V>> R collect(ShortToObjectFunction<? extends V> function, R target)
collect in interface ShortIterablepublic short max()
max in interface ShortIterablepublic short min()
min in interface ShortIterablepublic long sum()
sum in interface ShortIterablepublic long dotProduct(ShortList list)
dotProduct in interface ShortListpublic short[] toArray()
toArray in interface ShortIterablepublic short[] toArray(short[] target)
toArray in interface ShortIterablepublic boolean equals(Object otherList)
public int hashCode()
public void appendString(Appendable appendable, String start, String separator, String end)
appendString in interface PrimitiveIterablepublic MutableShortList asUnmodifiable()
asUnmodifiable in interface MutableShortCollectionasUnmodifiable in interface MutableShortListpublic MutableShortList asSynchronized()
asSynchronized in interface MutableShortCollectionasSynchronized in interface MutableShortListpublic ImmutableShortList toImmutable()
toImmutable in interface MutableShortCollectiontoImmutable in interface MutableShortListtoImmutable in interface ShortListpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException
readExternal in interface ExternalizableIOExceptionpublic LazyShortIterable asReversed()
asReversed in interface ReversibleShortIterablepublic ShortArrayList reverseThis()
reverseThis in interface MutableShortListpublic ShortArrayList sortThis()
sortThis in interface MutableShortListpublic ShortArrayList sortThis(ShortComparator comparator)
sortThis in interface MutableShortListpublic ShortArrayList toReversed()
toReversed in interface MutableShortListtoReversed in interface ShortListtoReversed in interface ReversibleShortIterablepublic int binarySearch(short value)
binarySearch in interface ShortListpublic MutableShortList distinct()
distinct in interface MutableShortListdistinct in interface ShortListdistinct in interface ReversibleShortIterablepublic MutableShortList subList(int fromIndex, int toIndex)
subList in interface MutableShortListsubList in interface ShortListpublic MutableList<ShortShortPair> zipShort(ShortIterable iterable)
zipShort in interface MutableShortListzipShort in interface ShortListpublic ShortArrayList newEmpty()
newEmpty in interface MutableShortCollectionnewEmpty in interface MutableShortListpublic <T> MutableList<ShortObjectPair<T>> zip(Iterable<T> iterable)
zip in interface MutableShortListzip in interface ShortListCopyright © 2004–2022. All rights reserved.