it.unimi.dsi.fastutil.doubles
Interface DoubleSet

All Superinterfaces:
java.util.Collection<java.lang.Double>, DoubleCollection, DoubleIterable, java.lang.Iterable<java.lang.Double>, java.util.Set<java.lang.Double>
All Known Subinterfaces:
DoubleSortedSet
All Known Implementing Classes:
AbstractDoubleSet, AbstractDoubleSortedSet, DoubleArraySet, DoubleAVLTreeSet, DoubleLinkedOpenCustomHashSet, DoubleLinkedOpenHashSet, DoubleOpenCustomHashSet, DoubleOpenHashBigSet, DoubleOpenHashSet, DoubleRBTreeSet, DoubleSets.EmptySet, DoubleSets.Singleton, DoubleSets.SynchronizedSet, DoubleSets.UnmodifiableSet, DoubleSortedSets.EmptySet, DoubleSortedSets.Singleton, DoubleSortedSets.SynchronizedSortedSet, DoubleSortedSets.UnmodifiableSortedSet

public interface DoubleSet
extends DoubleCollection, java.util.Set<java.lang.Double>

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
 DoubleIterator iterator()
          Returns a type-specific iterator on the elements of this set.
 boolean remove(double k)
          Removes an element from this set.
 
Methods inherited from interface it.unimi.dsi.fastutil.doubles.DoubleCollection
add, addAll, contains, containsAll, doubleIterator, rem, removeAll, retainAll, toArray, toArray, toDoubleArray, toDoubleArray
 
Methods inherited from interface java.util.Set
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, size, toArray, toArray
 

Method Detail

iterator

DoubleIterator 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 java.util.Collection<java.lang.Double>
Specified by:
iterator in interface DoubleCollection
Specified by:
iterator in interface DoubleIterable
Specified by:
iterator in interface java.lang.Iterable<java.lang.Double>
Specified by:
iterator in interface java.util.Set<java.lang.Double>
Returns:
a type-specific iterator on the elements of this set.

remove

boolean remove(double 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)