public interface LongSet
extends it.unimi.dsi.fastutil.longs.LongCollection, java.util.Set<java.lang.Long>
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.Long 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.longs.LongIterator |
iterator()
Returns a type-specific iterator on the elements of this set.
|
static LongSet |
of()
Returns an immutable empty set.
|
static LongSet |
of(long... a)
Returns an immutable list with the elements given.
|
static LongSet |
of(long e)
Returns an immutable set with the element given.
|
static LongSet |
of(long e0,
long e1)
Returns an immutable set with the elements given.
|
static LongSet |
of(long e0,
long e1,
long e2)
Returns an immutable set with the elements given.
|
default boolean |
rem(long k)
Deprecated.
Please use
remove() instead. |
boolean |
remove(long 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.longs.LongSpliterator |
spliterator()
Returns a type-specific spliterator on the elements of this set.
|
it.unimi.dsi.fastutil.longs.LongIterator iterator()
iterator in interface java.util.Collection<java.lang.Long>iterator in interface java.lang.Iterable<java.lang.Long>iterator in interface it.unimi.dsi.fastutil.longs.LongCollectioniterator in interface it.unimi.dsi.fastutil.longs.LongIterableiterator in interface java.util.Set<java.lang.Long>default it.unimi.dsi.fastutil.longs.LongSpliterator 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.Long>spliterator in interface java.lang.Iterable<java.lang.Long>spliterator in interface it.unimi.dsi.fastutil.longs.LongCollectionspliterator in interface it.unimi.dsi.fastutil.longs.LongIterablespliterator in interface java.util.Set<java.lang.Long>boolean remove(long k)
Collection.remove(Object)@Deprecated default boolean remove(java.lang.Object o)
remove in interface java.util.Collection<java.lang.Long>remove in interface it.unimi.dsi.fastutil.longs.LongCollectionremove in interface java.util.Set<java.lang.Long>@Deprecated default boolean add(java.lang.Long o)
add in interface java.util.Collection<java.lang.Long>add in interface it.unimi.dsi.fastutil.longs.LongCollectionadd in interface java.util.Set<java.lang.Long>@Deprecated default boolean contains(java.lang.Object o)
contains in interface java.util.Collection<java.lang.Long>contains in interface it.unimi.dsi.fastutil.longs.LongCollectioncontains in interface java.util.Set<java.lang.Long>@Deprecated default boolean rem(long 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.longs.LongCollectionstatic LongSet of()
static LongSet of(long e)
e - an element.e.static LongSet of(long e0, long e1)
e0 - the first element.e1 - the second element.e0 and e1.java.lang.IllegalArgumentException - if there were duplicate entries.static LongSet of(long e0, long e1, long 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 LongSet of(long... a)
a - the list of elements that will be in the final set.a.java.lang.IllegalArgumentException - if there are any duplicate entries.