java.io.Externalizable, java.io.Serializable, MutableShortCollection, PrimitiveIterable, MutableShortSet, ShortSet, ShortIterablepublic class ShortHashSet extends AbstractShortSet implements MutableShortSet, java.io.Externalizable
| Constructor | Description | 
|---|---|
| ShortHashSet() | |
| ShortHashSet(int initialCapacity) | |
| ShortHashSet(short... elements) | |
| ShortHashSet(ShortHashSet set) | 
| Modifier and Type | Method | Description | 
|---|---|---|
| boolean | add(short element) | |
| boolean | addAll(short... source) | |
| boolean | addAll(ShortIterable source) | |
| 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. | 
| MutableShortSet | asSynchronized() | |
| MutableShortSet | asUnmodifiable() | |
| RichIterable<ShortIterable> | chunk(int size) | Partitions elements in fixed size chunks. | 
| void | clear() | |
| <V> MutableSet<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. | 
| void | compact() | Rehashes every element in the set into a new backing table of the smallest possible size and eliminating removed sentinels. | 
| 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) | |
| void | each(ShortProcedure procedure) | A synonym for forEach. | 
| void | forEach(ShortProcedure procedure) | Applies the ShortProcedure to each element in the ShortIterable. | 
| ShortSet | freeze() | Returns a frozen copy of this set. | 
| int | hashCode() | Follows the same general contract as  Set.hashCode(). | 
| <T> T | injectInto(T injectedValue,
          ObjectShortToObjectFunction<? super T,? extends T> function) | |
| short | max() | |
| short | min() | |
| ShortHashSet | newEmpty() | Creates a new empty ShortHashSet. | 
| static ShortHashSet | newSet(ShortIterable source) | |
| static ShortHashSet | newSetWith(short... source) | |
| 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) | |
| ShortHashSet | 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) | |
| boolean | retainAll(short... source) | |
| boolean | retainAll(ShortIterable source) | |
| ShortHashSet | 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. | 
| 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. | 
| long | sum() | |
| short[] | toArray() | Converts the ShortIterable to a primitive short array. | 
| ImmutableShortSet | toImmutable() | Returns an immutable copy of this set. | 
| ShortHashSet | with(short element) | |
| ShortHashSet | withAll(ShortIterable elements) | |
| ShortHashSet | without(short element) | |
| ShortHashSet | withoutAll(ShortIterable elements) | |
| void | writeExternal(java.io.ObjectOutput out) | 
asLazy, average, containsAll, containsAll, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toStringequalsremoveIftapappendString, 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 ShortHashSet()
public ShortHashSet(int initialCapacity)
public ShortHashSet(short... elements)
public ShortHashSet(ShortHashSet set)
public static ShortHashSet newSet(ShortIterable source)
public static ShortHashSet newSetWith(short... source)
public int hashCode()
ShortSetSet.hashCode().hashCode in interface ShortSethashCode in class AbstractShortSetpublic int size()
PrimitiveIterablesize in interface PrimitiveIterablepublic 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 boolean add(short element)
add in interface MutableShortCollectionpublic boolean addAll(short... source)
addAll in interface MutableShortCollectionpublic boolean addAll(ShortIterable source)
addAll in interface MutableShortCollectionpublic 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 void clear()
clear in interface MutableShortCollectionpublic ShortHashSet with(short element)
with in interface MutableShortCollectionwith in interface MutableShortSetpublic ShortHashSet without(short element)
without in interface MutableShortCollectionwithout in interface MutableShortSetpublic ShortHashSet withAll(ShortIterable elements)
withAll in interface MutableShortCollectionwithAll in interface MutableShortSetpublic ShortHashSet withoutAll(ShortIterable elements)
withoutAll in interface MutableShortCollectionwithoutAll in interface MutableShortSetpublic MutableShortSet asUnmodifiable()
asUnmodifiable in interface MutableShortCollectionasUnmodifiable in interface MutableShortSetpublic MutableShortSet asSynchronized()
asSynchronized in interface MutableShortCollectionasSynchronized in interface MutableShortSetpublic ImmutableShortSet toImmutable()
MutableShortSettoImmutable in interface MutableShortCollectiontoImmutable in interface MutableShortSettoImmutable in interface ShortSetpublic MutableShortIterator shortIterator()
ShortIterableshortIterator in interface MutableShortCollectionshortIterator in interface ShortIterablepublic short[] toArray()
ShortIterabletoArray in interface ShortIterablepublic boolean contains(short value)
ShortIterablecontains in interface ShortIterablepublic void forEach(ShortProcedure procedure)
ShortIterableforEach in interface ShortIterablepublic void each(ShortProcedure procedure)
ShortIterableeach in interface ShortIterablepublic ShortHashSet select(ShortPredicate predicate)
ShortIterableselect in interface MutableShortCollectionselect in interface MutableShortSetselect in interface ShortIterableselect in interface ShortSetpublic <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 ShortHashSet reject(ShortPredicate predicate)
ShortIterablereject in interface MutableShortCollectionreject in interface MutableShortSetreject in interface ShortIterablereject in interface ShortSetpublic <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 <V> MutableSet<V> collect(ShortToObjectFunction<? extends V> function)
ShortIterablecollect in interface MutableShortCollectioncollect in interface MutableShortSetcollect in interface ShortIterablecollect in interface ShortSetpublic <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 detectIfNone(ShortPredicate predicate, short ifNone)
detectIfNone in interface ShortIterablepublic 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 long sum()
sum in interface ShortIterablepublic short max()
max in interface ShortIterablepublic short min()
min in interface ShortIterablepublic ShortSet freeze()
MutableShortSetfreeze in interface MutableShortSetfreeze in interface ShortSetpublic 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 <T> T injectInto(T injectedValue,
                        ObjectShortToObjectFunction<? super T,? extends T> function)
injectInto in interface ShortIterablepublic RichIterable<ShortIterable> chunk(int size)
ShortIterablechunk in interface ShortIterablesize - the number of elements per chunkRichIterable containing ShortIterables of size size, except the last will be
 truncated if the elements don't divide evenly.public ShortHashSet newEmpty()
newEmpty in interface MutableShortCollectionnewEmpty in interface MutableShortSetpublic void compact()
Copyright © 2004–2018. All rights reserved.