public static class DoubleSets.Singleton extends AbstractDoubleSet implements java.io.Serializable, java.lang.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(java.util.Collection<? extends java.lang.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.
|
java.lang.Object |
clone() |
boolean |
contains(double k) |
DoubleListIterator |
iterator()
Returns a type-specific iterator on the elements of this collection.
|
boolean |
removeAll(java.util.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(java.util.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, remove, removeadd, contains, containsAll, containsAll, doubleIterator, isEmpty, rem, rem, toArray, toArray, toArray, toDoubleArray, toStringcontainsAll, doubleIterator, rem, toArray, toArray, toDoubleArraypublic 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(java.util.Collection<? extends java.lang.Double> c)
AbstractDoubleCollectionaddAll in interface java.util.Collection<java.lang.Double>addAll in interface java.util.Set<java.lang.Double>addAll in class AbstractDoubleCollectionc - a collection.true if this collection changed as a result of the call.public boolean removeAll(java.util.Collection<?> c)
AbstractDoubleCollectionremoveAll in interface java.util.Collection<java.lang.Double>removeAll in interface java.util.Set<java.lang.Double>removeAll in class AbstractDoubleCollectionc - a collection.true if this collection changed as a result of the call.public boolean retainAll(java.util.Collection<?> c)
AbstractDoubleCollectionretainAll in interface java.util.Collection<java.lang.Double>retainAll in interface java.util.Set<java.lang.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 java.lang.Iterable<java.lang.Double>iterator in interface java.util.Collection<java.lang.Double>iterator in interface java.util.Set<java.lang.Double>iterator in class AbstractDoubleSetpublic int size()
size in interface java.util.Collection<java.lang.Double>size in interface java.util.Set<java.lang.Double>size in class java.util.AbstractCollection<java.lang.Double>public java.lang.Object clone()
clone in class java.lang.Object