|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.unimi.dsi.fastutil.objects.AbstractReferenceCollection<K>
it.unimi.dsi.fastutil.objects.AbstractReferenceSet<K>
it.unimi.dsi.fastutil.objects.ReferenceSets.Singleton<K>
public static class ReferenceSets.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.
Field Summary | |
---|---|
static long |
serialVersionUID
|
Method Summary | |
---|---|
boolean |
add(K k)
|
boolean |
addAll(Collection<? extends K> c)
Adds all elements of the given collection to this collection. |
Object |
clone()
|
boolean |
contains(Object k)
|
ObjectListIterator<K> |
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 |
retainAll(Collection<?> c)
Retains in this collection only elements from the given collection. |
int |
size()
|
Methods inherited from class it.unimi.dsi.fastutil.objects.AbstractReferenceSet |
---|
equals, hashCode, remove |
Methods inherited from class it.unimi.dsi.fastutil.objects.AbstractReferenceCollection |
---|
clear, containsAll, isEmpty, objectIterator, toArray, toArray, toString |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface it.unimi.dsi.fastutil.objects.ReferenceCollection |
---|
objectIterator, toArray |
Methods inherited from interface java.util.Set |
---|
clear, containsAll, isEmpty, toArray, toArray |
Field Detail |
---|
public static final long serialVersionUID
Method Detail |
---|
public boolean add(K k)
add
in interface Collection<K>
add
in interface Set<K>
add
in class AbstractReferenceCollection<K>
public boolean contains(Object k)
contains
in interface Collection<K>
contains
in interface Set<K>
public boolean addAll(Collection<? extends K> c)
AbstractReferenceCollection
addAll
in interface Collection<K>
addAll
in interface Set<K>
addAll
in class AbstractReferenceCollection<K>
c
- a collection.
true
if this collection changed as a result of the call.public boolean removeAll(Collection<?> c)
AbstractReferenceCollection
removeAll
in interface Collection<K>
removeAll
in interface Set<K>
removeAll
in class AbstractReferenceCollection<K>
c
- a collection.
true
if this collection changed as a result of the call.public boolean retainAll(Collection<?> c)
AbstractReferenceCollection
retainAll
in interface Collection<K>
retainAll
in interface Set<K>
retainAll
in class AbstractReferenceCollection<K>
c
- a collection.
true
if this collection changed as a result of the call.public ObjectListIterator<K> iterator()
ReferenceCollection
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 ObjectIterable<K>
iterator
in interface ReferenceCollection<K>
iterator
in interface ReferenceSet<K>
iterator
in interface Iterable<K>
iterator
in interface Collection<K>
iterator
in interface Set<K>
iterator
in class AbstractReferenceSet<K>
public int size()
size
in interface Collection<K>
size
in interface Set<K>
public Object clone()
clone
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |