
E - public class ImmutableCollectionWithCurrentElement<E> extends Object implements CollectionWithCurrentElement<E>, Serializable
| Modifier and Type | Field and Description |
|---|---|
private Collection<E> |
col |
private E |
cur |
private static long |
serialVersionUID |
| Constructor and Description |
|---|
ImmutableCollectionWithCurrentElement(Collection<E> origin,
E current) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E arg0) |
boolean |
addAll(Collection<? extends E> arg0) |
void |
clear() |
boolean |
contains(Object arg0) |
boolean |
containsAll(Collection<?> arg0) |
E |
getCurrent() |
boolean |
isEmpty() |
Iterator<E> |
iterator() |
boolean |
remove(Object arg0) |
boolean |
removeAll(Collection<?> arg0) |
boolean |
retainAll(Collection<?> arg0) |
void |
setCurrent(E e) |
int |
size() |
Object[] |
toArray() |
<T> T[] |
toArray(T[] arg0) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitequals, hashCode, parallelStream, removeIf, spliterator, streamprivate static final long serialVersionUID
private final Collection<E> col
private E cur
public ImmutableCollectionWithCurrentElement(Collection<E> origin, E current)
origin - the collection to make immutable and with a "current" elementcurrent - the current elementpublic boolean add(E arg0)
add in interface Collection<E>public boolean addAll(Collection<? extends E> arg0)
addAll in interface Collection<E>public void clear()
clear in interface Collection<E>public boolean contains(Object arg0)
contains in interface Collection<E>public boolean containsAll(Collection<?> arg0)
containsAll in interface Collection<E>public boolean isEmpty()
isEmpty in interface Collection<E>public boolean remove(Object arg0)
remove in interface Collection<E>public boolean removeAll(Collection<?> arg0)
removeAll in interface Collection<E>public boolean retainAll(Collection<?> arg0)
retainAll in interface Collection<E>public int size()
size in interface Collection<E>public Object[] toArray()
toArray in interface Collection<E>public <T> T[] toArray(T[] arg0)
toArray in interface Collection<E>public E getCurrent()
getCurrent in interface CollectionWithCurrentElement<E>public final void setCurrent(E e)
setCurrent in interface CollectionWithCurrentElement<E>e - the new active element