|
|||||||||
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.ReferenceCollections.EmptyCollection<K>
public abstract static class ReferenceCollections.EmptyCollection<K>
An immutable class representing an empty type-specific collection.
This class may be useful to implement your own in case you subclass a type-specific collection.
Method Summary | ||
---|---|---|
boolean |
add(K k)
|
|
void |
clear()
|
|
boolean |
contains(Object k)
|
|
boolean |
equals(Object o)
|
|
int |
hashCode()
|
|
ObjectListIterator<K> |
iterator()
Returns a type-specific iterator on the elements of this collection. |
|
int |
size()
|
|
Object[] |
toArray()
|
|
|
toArray(T[] a)
Returns an containing the items of this collection; the runtime type of the returned array is that of the specified array. |
Methods inherited from class it.unimi.dsi.fastutil.objects.AbstractReferenceCollection |
---|
addAll, containsAll, isEmpty, objectIterator, remove, removeAll, retainAll, toString |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public boolean add(K k)
add
in interface Collection<K>
add
in class AbstractReferenceCollection<K>
public boolean contains(Object k)
public Object[] toArray()
toArray
in interface Collection<K>
toArray
in class AbstractReferenceCollection<K>
public <T> T[] toArray(T[] a)
ReferenceCollection
Warning: Note that, contrarily to Collection.toArray(Object[])
, this
methods just writes all elements of this collection: no special
value will be added after the last one.
toArray
in interface ReferenceCollection<K>
toArray
in interface Collection<K>
toArray
in class AbstractReferenceCollection<K>
a
- if this array is big enough, it will be used to store this collection.
Collection.toArray(Object[])
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 Iterable<K>
iterator
in interface Collection<K>
iterator
in class AbstractReferenceCollection<K>
public int size()
public void clear()
clear
in interface Collection<K>
clear
in class AbstractReferenceCollection<K>
public int hashCode()
hashCode
in interface Collection<K>
hashCode
in class Object
public boolean equals(Object o)
equals
in interface Collection<K>
equals
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |