Package it.unimi.dsi.fastutil.longs
Interface LongSet
-
- All Superinterfaces:
Collection<Long>,Iterable<Long>,LongCollection,LongIterable,Set<Long>
- All Known Subinterfaces:
LongSortedSet
- All Known Implementing Classes:
AbstractLongSet,AbstractLongSortedSet,LongArraySet,LongAVLTreeSet,LongLinkedOpenCustomHashSet,LongLinkedOpenHashSet,LongOpenCustomHashSet,LongOpenHashBigSet,LongOpenHashSet,LongRBTreeSet,LongSets.EmptySet,LongSets.Singleton,LongSets.SynchronizedSet,LongSets.UnmodifiableSet,LongSortedSets.EmptySet,LongSortedSets.Singleton,LongSortedSets.SynchronizedSortedSet,LongSortedSets.UnmodifiableSortedSet
public interface LongSet extends LongCollection, Set<Long>
A type-specificSet; provides some additional methods that use polymorphism to avoid (un)boxing.Additionally, this interface strengthens (again)
iterator().- See Also:
Set
-
-
Method Summary
Modifier and Type Method Description default booleanadd(Long o)Deprecated.Please use the corresponding type-specific method instead.default booleancontains(Object o)Deprecated.Please use the corresponding type-specific method instead.LongIteratoriterator()Returns a type-specific iterator on the elements of this set.default booleanrem(long k)Deprecated.Please useremove()instead.booleanremove(long k)Removes an element from this set.default booleanremove(Object o)Deprecated.Please use the corresponding type-specific method instead.-
Methods inherited from interface java.util.Collection
parallelStream, stream, toArray
-
Methods inherited from interface it.unimi.dsi.fastutil.longs.LongCollection
add, addAll, contains, containsAll, removeAll, removeIf, removeIf, retainAll, toArray, toLongArray, toLongArray
-
Methods inherited from interface it.unimi.dsi.fastutil.longs.LongIterable
forEach, forEach
-
-
-
-
Method Detail
-
iterator
LongIterator iterator()
Returns a type-specific iterator on the elements of this set.Note that this specification strengthens the one given in
Iterable.iterator(), which was already strengthened in the corresponding type-specific class, but was weakened by the fact that this interface extendsSet.- Specified by:
iteratorin interfaceCollection<Long>- Specified by:
iteratorin interfaceIterable<Long>- Specified by:
iteratorin interfaceLongCollection- Specified by:
iteratorin interfaceLongIterable- Specified by:
iteratorin interfaceSet<Long>- Returns:
- a type-specific iterator on the elements of this set.
- See Also:
Iterable.iterator()
-
remove
boolean remove(long k)
Removes an element from this set.Note that the corresponding method of a type-specific collection is
rem(). This unfortunate situation is caused by the clash with the similarly named index-based method in theListinterface.- See Also:
Collection.remove(Object)
-
remove
@Deprecated default boolean remove(Object o)
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
removein interfaceCollection<Long>- Specified by:
removein interfaceLongCollection- Specified by:
removein interfaceSet<Long>
-
add
@Deprecated default boolean add(Long o)
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
addin interfaceCollection<Long>- Specified by:
addin interfaceLongCollection- Specified by:
addin interfaceSet<Long>
-
contains
@Deprecated default boolean contains(Object o)
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
containsin interfaceCollection<Long>- Specified by:
containsin interfaceLongCollection- Specified by:
containsin interfaceSet<Long>
-
rem
@Deprecated default boolean rem(long k)
Deprecated.Please useremove()instead.Removes an element from this set.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.- Specified by:
remin interfaceLongCollection- See Also:
Collection.remove(Object)
-
-