public abstract class AbstractCollectionState<T extends CollectionState<T,V>,U extends Collection<V>,V> extends Object implements CollectionState<T,V>
| Modifier and Type | Field and Description |
|---|---|
protected U |
collection |
| Constructor and Description |
|---|
AbstractCollectionState() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(V value) |
boolean |
addAll(Collection<? extends V> c) |
void |
clear() |
boolean |
contains(Object value) |
boolean |
containsAll(Collection<?> c) |
protected abstract U |
createCollection()
Creates the collection.
|
void |
init(net.kuujo.copycat.state.StateContext<T> context)
Initializes the state.
|
boolean |
isEmpty() |
Iterator<V> |
iterator() |
boolean |
remove(Object value) |
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
int |
size() |
Object[] |
toArray() |
<R> R[] |
toArray(R[] a) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitequals, hashCode, parallelStream, removeIf, spliterator, streamprotected U extends Collection<V> collection
protected abstract U createCollection()
public void init(net.kuujo.copycat.state.StateContext<T> context)
CollectionStateinit in interface CollectionState<T extends CollectionState<T,V>,V>context - The state context.public boolean add(V value)
add in interface Collection<V>add in interface CollectionState<T extends CollectionState<T,V>,V>public boolean addAll(Collection<? extends V> c)
addAll in interface Collection<V>addAll in interface CollectionState<T extends CollectionState<T,V>,V>public boolean retainAll(Collection<?> c)
retainAll in interface Collection<V>retainAll in interface CollectionState<T extends CollectionState<T,V>,V>public boolean remove(Object value)
remove in interface Collection<V>remove in interface CollectionState<T extends CollectionState<T,V>,V>public boolean removeAll(Collection<?> c)
removeAll in interface Collection<V>removeAll in interface CollectionState<T extends CollectionState<T,V>,V>public boolean contains(Object value)
contains in interface Collection<V>contains in interface CollectionState<T extends CollectionState<T,V>,V>public boolean containsAll(Collection<?> c)
containsAll in interface Collection<V>containsAll in interface CollectionState<T extends CollectionState<T,V>,V>public int size()
size in interface Collection<V>size in interface CollectionState<T extends CollectionState<T,V>,V>public boolean isEmpty()
isEmpty in interface Collection<V>isEmpty in interface CollectionState<T extends CollectionState<T,V>,V>public void clear()
clear in interface Collection<V>clear in interface CollectionState<T extends CollectionState<T,V>,V>public Object[] toArray()
toArray in interface Collection<V>public <R> R[] toArray(R[] a)
toArray in interface Collection<V>Copyright © 2013-2015. All Rights Reserved.