public abstract class ImmutableAbstractCollection<E> extends Object implements Immutable, Collection<E>, Serializable
| Modifier | Constructor and Description |
|---|---|
protected |
ImmutableAbstractCollection(Collection<E> collection)
Constructor that wraps (not copies).
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E e) |
boolean |
addAll(Collection<? extends E> c) |
protected void |
checkValidity()
Checks the validity of this object, and throws an
ImmutableModifiedThroughReflectionException if that check fails. |
void |
clear() |
boolean |
contains(Object object) |
boolean |
containsAll(Collection<?> c) |
boolean |
equals(Object o) |
int |
hashCode() |
boolean |
isEmpty() |
ImmutableIterator<E> |
iterator() |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
int |
size() |
Object[] |
toArray() |
<T> T[] |
toArray(T[] prototype) |
String |
toString() |
protected ImmutableAbstractCollection(Collection<E> collection)
collection - The collection to decorate, must not be nullIllegalArgumentException - if collection is nullprotected final void checkValidity()
ImmutableModifiedThroughReflectionException if that check fails.ImmutableModifiedThroughReflectionException - if the validity check fails.public final boolean equals(Object o)
equals in interface Collection<E>equals in class Objectpublic final int hashCode()
hashCode in interface Collection<E>hashCode in class Objectpublic final boolean contains(Object object)
contains in interface Collection<E>public final boolean containsAll(Collection<?> c)
containsAll in interface Collection<E>public final boolean isEmpty()
isEmpty in interface Collection<E>public final ImmutableIterator<E> iterator()
public final int size()
size in interface Collection<E>public final Object[] toArray()
toArray in interface Collection<E>public final <T> T[] toArray(T[] prototype)
toArray in interface Collection<E>public final boolean add(E e)
add in interface Collection<E>public final boolean addAll(Collection<? extends E> c)
addAll in interface Collection<E>public final void clear()
clear in interface Collection<E>public final boolean remove(Object o)
remove in interface Collection<E>public final boolean removeAll(Collection<?> c)
removeAll in interface Collection<E>public final boolean retainAll(Collection<?> c)
retainAll in interface Collection<E>Copyright © 2010-2013 NWTS Java Code. All Rights Reserved. Licensed Under the Apache License version 2.0.