|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection<K>
it.unimi.dsi.fastutil.objects.AbstractObjectCollection<K>
it.unimi.dsi.fastutil.objects.AbstractObjectSet<K>
it.unimi.dsi.fastutil.objects.ObjectSets.Singleton<K>
public static class ObjectSets.Singleton<K>
An immutable class representing a type-specific singleton set.
This class may be useful to implement your own in case you subclass a type-specific set.
Method Summary | |
---|---|
boolean |
add(K k)
|
boolean |
addAll(java.util.Collection<? extends K> c)
Adds all elements of the given collection to this collection. |
java.lang.Object |
clone()
|
boolean |
contains(java.lang.Object k)
|
ObjectListIterator<K> |
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 |
retainAll(java.util.Collection<?> c)
Retains in this collection only elements from the given collection. |
int |
size()
|
Methods inherited from class it.unimi.dsi.fastutil.objects.AbstractObjectSet |
---|
equals, hashCode, remove |
Methods inherited from class it.unimi.dsi.fastutil.objects.AbstractObjectCollection |
---|
containsAll, isEmpty, objectIterator, toArray, toArray, toString |
Methods inherited from class java.util.AbstractCollection |
---|
clear |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface it.unimi.dsi.fastutil.objects.ObjectCollection |
---|
objectIterator, toArray |
Methods inherited from interface java.util.Set |
---|
clear, containsAll, isEmpty, toArray, toArray |
Method Detail |
---|
public boolean add(K k)
add
in interface java.util.Collection<K>
add
in interface java.util.Set<K>
add
in class AbstractObjectCollection<K>
public boolean contains(java.lang.Object k)
contains
in interface java.util.Collection<K>
contains
in interface java.util.Set<K>
contains
in class java.util.AbstractCollection<K>
public boolean addAll(java.util.Collection<? extends K> c)
AbstractObjectCollection
addAll
in interface java.util.Collection<K>
addAll
in interface java.util.Set<K>
addAll
in class AbstractObjectCollection<K>
c
- a collection.
true
if this collection changed as a result of the call.public boolean removeAll(java.util.Collection<?> c)
AbstractObjectCollection
removeAll
in interface java.util.Collection<K>
removeAll
in interface java.util.Set<K>
removeAll
in class AbstractObjectCollection<K>
c
- a collection.
true
if this collection changed as a result of the call.public boolean retainAll(java.util.Collection<?> c)
AbstractObjectCollection
retainAll
in interface java.util.Collection<K>
retainAll
in interface java.util.Set<K>
retainAll
in class AbstractObjectCollection<K>
c
- a collection.
true
if this collection changed as a result of the call.public ObjectListIterator<K> iterator()
ObjectCollection
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 Collection
.
iterator
in interface ObjectCollection<K>
iterator
in interface ObjectIterable<K>
iterator
in interface ObjectSet<K>
iterator
in interface java.lang.Iterable<K>
iterator
in interface java.util.Collection<K>
iterator
in interface java.util.Set<K>
iterator
in class AbstractObjectSet<K>
public int size()
size
in interface java.util.Collection<K>
size
in interface java.util.Set<K>
size
in class java.util.AbstractCollection<K>
public java.lang.Object clone()
clone
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |