Package it.unimi.dsi.fastutil.longs
Interface LongSet
-
- All Superinterfaces:
java.util.Collection<java.lang.Long>,java.lang.Iterable<java.lang.Long>,LongCollection,LongIterable,java.util.Set<java.lang.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, java.util.Set<java.lang.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
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default booleanadd(java.lang.Long o)Deprecated.Please use the corresponding type-specific method instead.default booleancontains(java.lang.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(java.lang.Object o)Deprecated.Please use the corresponding type-specific method instead.-
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 interfacejava.util.Collection<java.lang.Long>- Specified by:
iteratorin interfacejava.lang.Iterable<java.lang.Long>- Specified by:
iteratorin interfaceLongCollection- Specified by:
iteratorin interfaceLongIterable- Specified by:
iteratorin interfacejava.util.Set<java.lang.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(java.lang.Object o)
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
removein interfacejava.util.Collection<java.lang.Long>- Specified by:
removein interfaceLongCollection- Specified by:
removein interfacejava.util.Set<java.lang.Long>
-
add
@Deprecated default boolean add(java.lang.Long o)
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
addin interfacejava.util.Collection<java.lang.Long>- Specified by:
addin interfaceLongCollection- Specified by:
addin interfacejava.util.Set<java.lang.Long>
-
contains
@Deprecated default boolean contains(java.lang.Object o)
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
containsin interfacejava.util.Collection<java.lang.Long>- Specified by:
containsin interfaceLongCollection- Specified by:
containsin interfacejava.util.Set<java.lang.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)
-
-