Package it.unimi.dsi.fastutil.doubles
Interface DoubleSet
- All Superinterfaces:
Collection<Double>,DoubleCollection,DoubleIterable,Iterable<Double>,Set<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, Set<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
Modifier and Type Method Description default booleanadd(Double o)Deprecated.Please use the corresponding type-specific method instead.default booleancontains(Object o)Deprecated.Please use the corresponding type-specific method instead.DoubleIteratoriterator()Returns a type-specific iterator on the elements of this set.default booleanrem(double k)Deprecated.Please useremove()instead.booleanremove(double k)Removes an element from this set.default booleanremove(Object o)Deprecated.Please use the corresponding type-specific method instead.Methods inherited from interface it.unimi.dsi.fastutil.doubles.DoubleCollection
add, addAll, contains, containsAll, removeAll, removeIf, removeIf, retainAll, toArray, toDoubleArray, toDoubleArray
-
Method Details
-
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 extendsSet.- Specified by:
iteratorin interfaceCollection<Double>- Specified by:
iteratorin interfaceDoubleCollection- Specified by:
iteratorin interfaceDoubleIterable- Specified by:
iteratorin interfaceIterable<Double>- Specified by:
iteratorin interfaceSet<Double>- Returns:
- a type-specific iterator on the elements of this set.
- See Also:
Iterable.iterator()
-
remove
boolean remove(double 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.Please use the corresponding type-specific method instead.- Specified by:
removein interfaceCollection<Double>- Specified by:
removein interfaceDoubleCollection- Specified by:
removein interfaceSet<Double>
-
add
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
addin interfaceCollection<Double>- Specified by:
addin interfaceDoubleCollection- Specified by:
addin interfaceSet<Double>
-
contains
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
containsin interfaceCollection<Double>- Specified by:
containsin interfaceDoubleCollection- Specified by:
containsin interfaceSet<Double>
-
rem
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 interfaceDoubleCollection- See Also:
Collection.remove(Object)
-