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-specific Set; provides some additional methods that use polymorphism to avoid (un)boxing.

Additionally, this interface strengthens (again) iterator().

See Also:
Set

Method Summary
 LongIterator iterator()
          Returns a type-specific iterator on the elements of this set.
 boolean remove(long k)
          Removes an element from this set.
 
Methods inherited from interface it.unimi.dsi.fastutil.longs.LongCollection
add, addAll, contains, containsAll, longIterator, rem, removeAll, retainAll, toArray, toArray, toLongArray, toLongArray
 
Methods inherited from interface java.util.Set
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, size, toArray, toArray
 

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 extends Set.

Specified by:
iterator in interface Collection<Long>
Specified by:
iterator in interface Iterable<Long>
Specified by:
iterator in interface LongCollection
Specified by:
iterator in interface LongIterable
Specified by:
iterator in interface Set<Long>
Returns:
a type-specific iterator on the elements of this set.

remove

boolean remove(long k)
Removes an element from this set.

Note that the corresponding method of the type-specific collection is rem(). This unfortunate situation is caused by the clash with the similarly named index-based method in the List interface.

See Also:
Collection.remove(Object)