public interface IntSet
extends it.unimi.dsi.fastutil.ints.IntCollection, java.util.Set<java.lang.Integer>
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.Integer 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.ints.IntIterator |
iterator()
Returns a type-specific iterator on the elements of this set.
|
static IntSet |
of()
Returns an immutable empty set.
|
static IntSet |
of(int... a)
Returns an immutable list with the elements given.
|
static IntSet |
of(int e)
Returns an immutable set with the element given.
|
static IntSet |
of(int e0,
int e1)
Returns an immutable set with the elements given.
|
static IntSet |
of(int e0,
int e1,
int e2)
Returns an immutable set with the elements given.
|
default boolean |
rem(int k)
Deprecated.
Please use
remove() instead. |
boolean |
remove(int k)
Removes an element from this set.
|
default boolean |
remove(java.lang.Object o)
Deprecated.
Please use the corresponding type-specific method instead.
|
default it.unimi.dsi.fastutil.ints.IntSpliterator |
spliterator()
Returns a type-specific spliterator on the elements of this set.
|
it.unimi.dsi.fastutil.ints.IntIterator iterator()
iterator in interface java.util.Collection<java.lang.Integer>iterator in interface it.unimi.dsi.fastutil.ints.IntCollectioniterator in interface it.unimi.dsi.fastutil.ints.IntIterableiterator in interface java.lang.Iterable<java.lang.Integer>iterator in interface java.util.Set<java.lang.Integer>default it.unimi.dsi.fastutil.ints.IntSpliterator 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.Integer>spliterator in interface it.unimi.dsi.fastutil.ints.IntCollectionspliterator in interface it.unimi.dsi.fastutil.ints.IntIterablespliterator in interface java.lang.Iterable<java.lang.Integer>spliterator in interface java.util.Set<java.lang.Integer>boolean remove(int k)
Collection.remove(Object)@Deprecated default boolean remove(java.lang.Object o)
remove in interface java.util.Collection<java.lang.Integer>remove in interface it.unimi.dsi.fastutil.ints.IntCollectionremove in interface java.util.Set<java.lang.Integer>@Deprecated default boolean add(java.lang.Integer o)
add in interface java.util.Collection<java.lang.Integer>add in interface it.unimi.dsi.fastutil.ints.IntCollectionadd in interface java.util.Set<java.lang.Integer>@Deprecated default boolean contains(java.lang.Object o)
contains in interface java.util.Collection<java.lang.Integer>contains in interface it.unimi.dsi.fastutil.ints.IntCollectioncontains in interface java.util.Set<java.lang.Integer>@Deprecated default boolean rem(int 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.ints.IntCollectionstatic IntSet of()
static IntSet of(int e)
e - an element.e.static IntSet of(int e0, int e1)
e0 - the first element.e1 - the second element.e0 and e1.java.lang.IllegalArgumentException - if there were duplicate entries.static IntSet of(int e0, int e1, int 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 IntSet of(int... a)
a - the list of elements that will be in the final set.a.java.lang.IllegalArgumentException - if there are any duplicate entries.