java.io.Externalizable, java.io.Serializable, MutableShortCollection, MutableShortList, ShortList, OrderedShortIterable, ReversibleShortIterable, PrimitiveIterable, ShortIterablepublic class ShortArrayList extends AbstractShortIterable implements MutableShortList, java.io.Externalizable
FastList, and is memory-optimized for short primitives.
 This file was automatically generated from template file primitiveArrayList.stg.| Constructor | Description | 
|---|---|
| ShortArrayList() | |
| ShortArrayList(int initialCapacity) | |
| ShortArrayList(short... array) | 
| Modifier and Type | Method | 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) | Returns true if all of the elements in the ShortIterable return true for the
 specified predicate, otherwise returns false. | 
| boolean | anySatisfy(ShortPredicate predicate) | Returns true if any of the elements in the ShortIterable return true for the
 specified predicate, otherwise returns false. | 
| void | appendString(java.lang.Appendable appendable,
            java.lang.String start,
            java.lang.String separator,
            java.lang.String end) | Prints a string representation of this collection onto the given  Appendable. | 
| LazyShortIterable | asReversed() | |
| MutableShortList | asSynchronized() | |
| MutableShortList | asUnmodifiable() | |
| int | binarySearch(short value) | |
| void | clear() | |
| <V> MutableList<V> | collect(ShortToObjectFunction<? extends V> function) | Returns a new collection with the results of applying the specified function on each element of the source
 collection. | 
| <V,R extends java.util.Collection<V>> | collect(ShortToObjectFunction<? extends V> function,
       R target) | Same as  ShortIterable.collect(ShortToObjectFunction), only the results are added to the target Collection. | 
| boolean | contains(short value) | Returns true if the value is contained in the ShortIterable, and false if it is not. | 
| int | count(ShortPredicate predicate) | Returns a count of the number of elements in the ShortIterable that return true for the
 specified predicate. | 
| short | detectIfNone(ShortPredicate predicate,
            short ifNone) | |
| MutableShortList | distinct() | |
| long | dotProduct(ShortList list) | |
| void | each(ShortProcedure procedure) | A synonym for forEach. | 
| void | ensureCapacity(int minCapacity) | |
| boolean | equals(java.lang.Object otherList) | Follows the same general contract as  List.equals(Object). | 
| void | forEach(ShortProcedure procedure) | Applies the ShortProcedure to each element in the ShortIterable. | 
| void | forEachWithIndex(ShortIntProcedure procedure) | |
| short | get(int index) | |
| short | getFirst() | |
| short | getLast() | |
| int | hashCode() | Follows the same general contract as  List.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() | |
| static ShortArrayList | newList(ShortIterable source) | |
| static ShortArrayList | newListWith(short... elements) | Creates a new list using the passed  elementsargument as the backing store. | 
| static ShortArrayList | newWithNValues(int size,
              short value) | |
| boolean | noneSatisfy(ShortPredicate predicate) | Returns true if none of the elements in the ShortIterable return true for the
 specified predicate, otherwise returns false. | 
| void | readExternal(java.io.ObjectInput in) | |
| ShortArrayList | reject(ShortPredicate predicate) | Returns a new ShortIterable with all of the elements in the ShortIterable that
 return false for the specified predicate. | 
| <R extends MutableShortCollection> | reject(ShortPredicate predicate,
      R target) | Same as  ShortIterable.reject(ShortPredicate), only the results are added to the target MutableShortCollection. | 
| boolean | remove(short value) | |
| boolean | removeAll(short... source) | |
| boolean | removeAll(ShortIterable source) | |
| short | removeAtIndex(int index) | |
| boolean | retainAll(short... source) | |
| boolean | retainAll(ShortIterable source) | |
| ShortArrayList | reverseThis() | |
| ShortArrayList | select(ShortPredicate predicate) | Returns a new ShortIterable with all of the elements in the ShortIterable that
 return true for the specified predicate. | 
| <R extends MutableShortCollection> | select(ShortPredicate predicate,
      R target) | Same as  ShortIterable.select(ShortPredicate), only the results are added to the target MutableShortCollection. | 
| short | set(int index,
   short element) | |
| MutableShortIterator | shortIterator() | Returns a primitive iterator that can be used to iterate over the ShortIterable in an
 imperative style. | 
| int | size() | Returns the number of items in this iterable. | 
| ShortArrayList | sortThis() | Sorts this list mutating its contents and returns the same mutable list (this). | 
| MutableShortList | subList(int fromIndex,
       int toIndex) | |
| long | sum() | |
| short[] | toArray() | Converts the ShortIterable to a primitive short array. | 
| ImmutableShortList | toImmutable() | Returns an immutable copy of this list. | 
| 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) | |
| void | writeExternal(java.io.ObjectOutput out) | 
asLazy, average, containsAll, containsAll, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toStringtapappendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, toStringasLazy, average, averageIfEmpty, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, containsAll, containsAll, flatCollect, maxIfEmpty, median, medianIfEmpty, minIfEmpty, summaryStatistics, toBag, toList, toSet, toSortedArray, toSortedListpublic 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 int size()
PrimitiveIterablesize in interface PrimitiveIterablepublic void clear()
clear in interface MutableShortCollectionpublic boolean contains(short value)
ShortIterablecontains 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 removeAll(ShortIterable source)
removeAll in interface MutableShortCollectionpublic boolean removeAll(short... source)
removeAll in interface MutableShortCollectionpublic boolean retainAll(ShortIterable source)
retainAll in interface MutableShortCollectionCollection.retainAll(Collection)public boolean retainAll(short... source)
retainAll in interface MutableShortCollectionCollection.retainAll(Collection)public short removeAtIndex(int index)
removeAtIndex in interface MutableShortListpublic short set(int index,
                 short element)
set 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()
ShortIterableshortIterator in interface MutableShortCollectionshortIterator in interface ShortIterablepublic void forEach(ShortProcedure procedure)
ShortIterableforEach in interface ShortIterablepublic void each(ShortProcedure procedure)
ShortIterableeach 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 int count(ShortPredicate predicate)
ShortIterablecount in interface ShortIterablepublic boolean anySatisfy(ShortPredicate predicate)
ShortIterableanySatisfy in interface ShortIterablepublic boolean allSatisfy(ShortPredicate predicate)
ShortIterableallSatisfy in interface ShortIterablepublic boolean noneSatisfy(ShortPredicate predicate)
ShortIterablenoneSatisfy in interface ShortIterablepublic ShortArrayList select(ShortPredicate predicate)
ShortIterableselect in interface MutableShortCollectionselect in interface MutableShortListselect in interface OrderedShortIterableselect in interface ReversibleShortIterableselect in interface ShortIterableselect in interface ShortListpublic <R extends MutableShortCollection> R select(ShortPredicate predicate, R target)
ShortIterableShortIterable.select(ShortPredicate) , only the results are added to the target MutableShortCollection.select in interface ShortIterablepublic ShortArrayList reject(ShortPredicate predicate)
ShortIterablereject in interface MutableShortCollectionreject in interface MutableShortListreject in interface OrderedShortIterablereject in interface ReversibleShortIterablereject in interface ShortIterablereject in interface ShortListpublic <R extends MutableShortCollection> R reject(ShortPredicate predicate, R target)
ShortIterableShortIterable.reject(ShortPredicate) , only the results are added to the target MutableShortCollection.reject in interface ShortIterablepublic short detectIfNone(ShortPredicate predicate, short ifNone)
detectIfNone in interface ShortIterablepublic <V> MutableList<V> collect(ShortToObjectFunction<? extends V> function)
ShortIterablecollect in interface MutableShortCollectioncollect in interface MutableShortListcollect in interface OrderedShortIterablecollect in interface ReversibleShortIterablecollect in interface ShortIterablecollect in interface ShortListpublic <V,R extends java.util.Collection<V>> R collect(ShortToObjectFunction<? extends V> function, R target)
ShortIterableShortIterable.collect(ShortToObjectFunction) , only the results are added to the target Collection.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()
ShortIterabletoArray in interface ShortIterablepublic boolean equals(java.lang.Object otherList)
ShortListList.equals(Object).public int hashCode()
ShortListList.hashCode().public void appendString(java.lang.Appendable appendable,
                         java.lang.String start,
                         java.lang.String separator,
                         java.lang.String end)
PrimitiveIterableAppendable.  Prints the string returned
 by PrimitiveIterable.makeString(String, String, String).appendString in interface PrimitiveIterablepublic MutableShortList asUnmodifiable()
asUnmodifiable in interface MutableShortCollectionasUnmodifiable in interface MutableShortListpublic MutableShortList asSynchronized()
asSynchronized in interface MutableShortCollectionasSynchronized in interface MutableShortListpublic ImmutableShortList toImmutable()
MutableShortListtoImmutable in interface MutableShortCollectiontoImmutable in interface MutableShortListtoImmutable in interface ShortListpublic void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOExceptionpublic void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException
readExternal in interface java.io.Externalizablejava.io.IOExceptionpublic LazyShortIterable asReversed()
asReversed in interface ReversibleShortIterablepublic ShortArrayList reverseThis()
reverseThis in interface MutableShortListpublic ShortArrayList sortThis()
MutableShortListsortThis in interface MutableShortListpublic ShortArrayList toReversed()
toReversed in interface MutableShortListtoReversed in interface ReversibleShortIterabletoReversed in interface ShortListpublic int binarySearch(short value)
binarySearch in interface ShortListpublic MutableShortList distinct()
distinct in interface MutableShortListdistinct in interface ReversibleShortIterabledistinct in interface ShortListpublic MutableShortList subList(int fromIndex, int toIndex)
subList in interface MutableShortListsubList in interface ShortListList.subList(int fromIndex, int toIndex)Copyright © 2004–2017. All rights reserved.