public abstract class InflatableCollection extends AbstractCollection
| Modifier and Type | Class | Description |
|---|---|---|
protected static interface |
InflatableCollection.InflatedCollection |
A marker interface which is used to identify internally inflated
Collections.
|
| Modifier and Type | Field | Description |
|---|---|---|
protected Object |
m_oValue |
Holds NO_VALUE, a single value, or an InflatedCollection of values.
|
protected static Object |
NO_VALUE |
A marker value indicating that the single value has not been initialized.
|
protected static AtomicReferenceFieldUpdater<InflatableCollection,Object> |
VALUE_UPDATER |
Atomic updater for collection values.
|
| Constructor | Description |
|---|---|
InflatableCollection() |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
add(Object o) |
|
void |
clear() |
|
boolean |
contains(Object o) |
|
boolean |
equals(Object o) |
|
int |
hashCode() |
|
protected abstract InflatableCollection.InflatedCollection |
instantiateCollection() |
Factory method used to create a new Collection.
|
Iterator |
iterator() |
|
boolean |
remove(Object o) |
|
boolean |
removeAll(Collection c) |
|
boolean |
retainAll(Collection c) |
|
int |
size() |
|
Object[] |
toArray() |
|
Object[] |
toArray(Object[] ao) |
addAll, containsAll, isEmpty, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitparallelStream, removeIf, spliterator, streamprotected static final Object NO_VALUE
protected static final AtomicReferenceFieldUpdater<InflatableCollection,Object> VALUE_UPDATER
AtomicReference
is shared to reduce memory footprint of each InflatableCollection instance. (COH-9262)protected volatile Object m_oValue
public boolean equals(Object o)
equals in interface Collectionequals in class Objectpublic int hashCode()
hashCode in interface CollectionhashCode in class Objectpublic boolean add(Object o)
add in interface Collectionadd in class AbstractCollectionpublic boolean remove(Object o)
remove in interface Collectionremove in class AbstractCollectionpublic boolean removeAll(Collection c)
removeAll in interface CollectionremoveAll in class AbstractCollectionpublic boolean retainAll(Collection c)
retainAll in interface CollectionretainAll in class AbstractCollectionpublic void clear()
clear in interface Collectionclear in class AbstractCollectionpublic boolean contains(Object o)
contains in interface Collectioncontains in class AbstractCollectionpublic Iterator iterator()
iterator in interface Iterableiterator in interface Collectioniterator in class AbstractCollectionpublic int size()
size in interface Collectionsize in class AbstractCollectionpublic Object[] toArray()
toArray in interface CollectiontoArray in class AbstractCollectionpublic Object[] toArray(Object[] ao)
toArray in interface CollectiontoArray in class AbstractCollectionprotected abstract InflatableCollection.InflatedCollection instantiateCollection()