E
- element typeC
- collection typepublic abstract class AbstractHistoricalCollection<E,C extends Collection<E>> extends AbstractHistorical<E,AbstractHistoricalCollection.EventCollection<E,C>> implements HistoricalCollection<E>
Set
introduces no new methods relative to Collection
.Iterator
returned by this class does not support the remove()
method.
Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
Modifier and Type | Class and Description |
---|---|
static class |
AbstractHistoricalCollection.AddEvent<E,C extends Collection<E>>
Event for adding value to the collection.
|
static class |
AbstractHistoricalCollection.EventCollection<E,C extends Collection<E>>
Abstract super class for events that add or remove a value from the collection.
|
static class |
AbstractHistoricalCollection.RemoveEvent<E,C extends Collection<E>>
Event for removing value from the collection.
|
AbstractHistorical.EventValue<T>
Modifier | Constructor and Description |
---|---|
protected |
AbstractHistoricalCollection(HistoryManager historyManager,
C collection)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(E value) |
boolean |
addAll(Collection<? extends E> c) |
void |
clear() |
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
protected C |
fill(C collection)
Fill collection with the current collection.
|
protected C |
fill(Time time,
C collection)
Fill collection with the collection at the given simulation time.
|
protected C |
getCollection()
Returns the internal collection.
|
boolean |
isEmpty() |
Iterator<E> |
iterator() |
boolean |
remove(Object value) |
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
int |
size() |
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
addEvent, cleanUpHistory, getEvent, getEvents, getLastEvent, isLastState, now, removeEvent
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
get, get, removeIf
equals, hashCode, parallelStream, spliterator, stream
protected AbstractHistoricalCollection(HistoryManager historyManager, C collection)
historyManager
- HistoryManager; history managercollection
- C; initial collectionprotected final C getCollection()
protected final C fill(C collection)
collection
- C; collection to fillprotected final C fill(Time time, C collection)
time
- Time; timecollection
- C; collection to fillpublic boolean add(E value)
add
in interface Collection<E>
public boolean addAll(Collection<? extends E> c)
addAll
in interface Collection<E>
public void clear()
clear
in interface Collection<E>
public boolean remove(Object value)
remove
in interface Collection<E>
public boolean removeAll(Collection<?> c)
removeAll
in interface Collection<E>
public boolean retainAll(Collection<?> c)
retainAll
in interface Collection<E>
public int size()
size
in interface Collection<E>
public boolean isEmpty()
isEmpty
in interface Collection<E>
public boolean contains(Object o)
contains
in interface Collection<E>
public Object[] toArray()
toArray
in interface Collection<E>
public <T> T[] toArray(T[] a)
toArray
in interface Collection<E>
public boolean containsAll(Collection<?> c)
containsAll
in interface Collection<E>
Copyright © 2014–2019 Delft University of Technology. All rights reserved.