public interface ShortSet
extends it.unimi.dsi.fastutil.shorts.ShortCollection, java.util.Set<java.lang.Short>
Set; provides some additional methods that use polymorphism to avoid (un)boxing.
Additionally, this interface strengthens (again) iterator().
Set| Modifier and Type | Method and Description |
|---|---|
default boolean |
add(java.lang.Short o)
Deprecated.
Please use the corresponding type-specific method instead.
|
default boolean |
contains(java.lang.Object o)
Deprecated.
Please use the corresponding type-specific method instead.
|
it.unimi.dsi.fastutil.shorts.ShortIterator |
iterator()
Returns a type-specific iterator on the elements of this set.
|
static ShortSet |
of()
Returns an immutable empty set.
|
static ShortSet |
of(short... a)
Returns an immutable list with the elements given.
|
static ShortSet |
of(short e)
Returns an immutable set with the element given.
|
static ShortSet |
of(short e0,
short e1)
Returns an immutable set with the elements given.
|
static ShortSet |
of(short e0,
short e1,
short e2)
Returns an immutable set with the elements given.
|
default boolean |
rem(short k)
Deprecated.
Please use
remove() instead. |
default boolean |
remove(java.lang.Object o)
Deprecated.
Please use the corresponding type-specific method instead.
|
boolean |
remove(short k)
Removes an element from this set.
|
default it.unimi.dsi.fastutil.shorts.ShortSpliterator |
spliterator()
Returns a type-specific spliterator on the elements of this set.
|
add, addAll, contains, containsAll, intIterator, intParallelStream, intSpliterator, intStream, parallelStream, removeAll, removeIf, removeIf, removeIf, retainAll, stream, toArray, toShortArray, toShortArrayit.unimi.dsi.fastutil.shorts.ShortIterator iterator()
iterator in interface java.util.Collection<java.lang.Short>iterator in interface java.lang.Iterable<java.lang.Short>iterator in interface java.util.Set<java.lang.Short>iterator in interface it.unimi.dsi.fastutil.shorts.ShortCollectioniterator in interface it.unimi.dsi.fastutil.shorts.ShortIterabledefault it.unimi.dsi.fastutil.shorts.ShortSpliterator spliterator()
Set spliterators must report at least Spliterator.DISTINCT.
See Set.spliterator() for more documentation on the requirements
of the returned spliterator.
spliterator in interface java.util.Collection<java.lang.Short>spliterator in interface java.lang.Iterable<java.lang.Short>spliterator in interface java.util.Set<java.lang.Short>spliterator in interface it.unimi.dsi.fastutil.shorts.ShortCollectionspliterator in interface it.unimi.dsi.fastutil.shorts.ShortIterableboolean remove(short k)
Collection.remove(Object)@Deprecated default boolean remove(java.lang.Object o)
remove in interface java.util.Collection<java.lang.Short>remove in interface java.util.Set<java.lang.Short>remove in interface it.unimi.dsi.fastutil.shorts.ShortCollection@Deprecated default boolean add(java.lang.Short o)
add in interface java.util.Collection<java.lang.Short>add in interface java.util.Set<java.lang.Short>add in interface it.unimi.dsi.fastutil.shorts.ShortCollection@Deprecated default boolean contains(java.lang.Object o)
contains in interface java.util.Collection<java.lang.Short>contains in interface java.util.Set<java.lang.Short>contains in interface it.unimi.dsi.fastutil.shorts.ShortCollection@Deprecated default boolean rem(short k)
remove() instead.This method is inherited from the type-specific collection this
type-specific set is based on, but it should not used as
this interface reinstates remove() as removal method.
rem in interface it.unimi.dsi.fastutil.shorts.ShortCollectionstatic ShortSet of()
static ShortSet of(short e)
e - an element.e.static ShortSet of(short e0, short e1)
e0 - the first element.e1 - the second element.e0 and e1.java.lang.IllegalArgumentException - if there were duplicate entries.static ShortSet of(short e0, short e1, short e2)
e0 - the first element.e1 - the second element.e2 - the third element.e0, e1, and e2.java.lang.IllegalArgumentException - if there were duplicate entries.static ShortSet of(short... a)
a - the list of elements that will be in the final set.a.java.lang.IllegalArgumentException - if there are any duplicate entries.