public static class DoubleSets.Singleton extends AbstractDoubleSet implements Serializable, Cloneable
This class may be useful to implement your own in case you subclass a type-specific set.
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(double k) |
boolean |
addAll(Collection<? extends Double> c)
Adds all elements of the given collection to this collection.
|
boolean |
addAll(DoubleCollection c)
Adds all elements of the given type-specific collection to this collection.
|
Object |
clone() |
boolean |
contains(double k) |
DoubleListIterator |
iterator()
Returns a type-specific iterator on the elements of this collection.
|
boolean |
removeAll(Collection<?> c)
Remove from this collection all elements in the given collection.
|
boolean |
removeAll(DoubleCollection c)
Remove from this collection all elements in the given type-specific collection.
|
boolean |
retainAll(Collection<?> c)
Retains in this collection only elements from the given collection.
|
boolean |
retainAll(DoubleCollection c)
Retains in this collection only elements from the given type-specific collection.
|
int |
size() |
double[] |
toDoubleArray()
Returns a primitive type array containing the items of this collection.
|
equals, hashCode, rem, remove, removeadd, contains, containsAll, containsAll, doubleIterator, isEmpty, rem, toArray, toArray, toArray, toDoubleArray, toStringclearcontainsAll, doubleIterator, toArray, toArray, toDoubleArrayadd, clear, contains, containsAll, isEmpty, spliterator, toArray, toArrayparallelStream, removeIf, streampublic boolean add(double k)
add in interface DoubleCollectionadd in class AbstractDoubleCollectionCollection.add(Object)public boolean contains(double k)
contains in interface DoubleCollectioncontains in class AbstractDoubleCollectionCollection.contains(Object)public boolean addAll(Collection<? extends Double> c)
AbstractDoubleCollectionaddAll in interface Collection<Double>addAll in interface Set<Double>addAll in class AbstractDoubleCollectionc - a collection.true if this collection changed as a result of the call.public boolean removeAll(Collection<?> c)
AbstractDoubleCollectionremoveAll in interface Collection<Double>removeAll in interface Set<Double>removeAll in class AbstractDoubleCollectionc - a collection.true if this collection changed as a result of the call.public boolean retainAll(Collection<?> c)
AbstractDoubleCollectionretainAll in interface Collection<Double>retainAll in interface Set<Double>retainAll in class AbstractDoubleCollectionc - a collection.true if this collection changed as a result of the call.public double[] toDoubleArray()
DoubleCollectiontoDoubleArray in interface DoubleCollectiontoDoubleArray in class AbstractDoubleCollectionCollection.toArray()public boolean addAll(DoubleCollection c)
AbstractDoubleCollectionaddAll in interface DoubleCollectionaddAll in class AbstractDoubleCollectionc - a type-specific collection.true if this collection changed as a result of the call.Collection.addAll(Collection)public boolean removeAll(DoubleCollection c)
AbstractDoubleCollectionremoveAll in interface DoubleCollectionremoveAll in class AbstractDoubleCollectionc - a type-specific collection.true if this collection changed as a result of the call.Collection.removeAll(Collection)public boolean retainAll(DoubleCollection c)
AbstractDoubleCollectionretainAll in interface DoubleCollectionretainAll in class AbstractDoubleCollectionc - a type-specific collection.true if this collection changed as a result of the call.Collection.retainAll(Collection)public DoubleListIterator iterator()
DoubleCollectionNote 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 Collection.
iterator in interface DoubleCollectioniterator in interface DoubleIterableiterator in interface DoubleSetiterator in interface Iterable<Double>iterator in interface Collection<Double>iterator in interface Set<Double>iterator in class AbstractDoubleSetpublic int size()
size in interface Collection<Double>size in interface Set<Double>size in class AbstractCollection<Double>