Class AbstractHistoricalQueue<E,Q extends Queue<E>>
- java.lang.Object
-
- org.opentrafficsim.core.perception.AbstractHistorical<E,AbstractHistoricalCollection.EventCollection<E,C>>
-
- org.opentrafficsim.core.perception.collections.AbstractHistoricalCollection<E,Q>
-
- org.opentrafficsim.core.perception.collections.AbstractHistoricalQueue<E,Q>
-
- Type Parameters:
E
- element typeQ
- queue type
- All Implemented Interfaces:
Iterable<E>
,Collection<E>
,Queue<E>
,HistoricalCollection<E>
,HistoricalQueue<E>
,HistoryManager.HistoricalElement
- Direct Known Subclasses:
HistoricalPriorityQueue
public abstract class AbstractHistoricalQueue<E,Q extends Queue<E>> extends AbstractHistoricalCollection<E,Q> implements HistoricalQueue<E>
Queue-valued historical state. The current queue is always maintained, and past states of the queue are obtained by applying the events between now and the requested time in reverse.
TheIterator
returned by this class does not support theremove()
method.Copyright (c) 2013-2022 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.- Version:
- $Revision$, $LastChangedDate$, by $Author$, initial version 4 feb. 2018
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.opentrafficsim.core.perception.collections.AbstractHistoricalCollection
AbstractHistoricalCollection.AddEvent<E,C extends Collection<E>>, AbstractHistoricalCollection.EventCollection<E,C extends Collection<E>>, AbstractHistoricalCollection.RemoveEvent<E,C extends Collection<E>>
-
Nested classes/interfaces inherited from class org.opentrafficsim.core.perception.AbstractHistorical
AbstractHistorical.EventValue<T>
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractHistoricalQueue(HistoryManager historyManager, Q queue)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description E
element()
boolean
offer(E e)
E
peek()
E
poll()
E
remove()
-
Methods inherited from class org.opentrafficsim.core.perception.collections.AbstractHistoricalCollection
add, addAll, clear, contains, containsAll, fill, fill, getCollection, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
-
Methods inherited from class org.opentrafficsim.core.perception.AbstractHistorical
addEvent, cleanUpHistory, getEvent, getEvents, getLastEvent, isLastState, now, removeEvent
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Collection
addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, remove, removeAll, retainAll, size, spliterator, stream, toArray, toArray, toArray
-
Methods inherited from interface org.opentrafficsim.core.perception.collections.HistoricalCollection
removeIf
-
Methods inherited from interface org.opentrafficsim.core.perception.collections.HistoricalQueue
get, get
-
-
-
-
Constructor Detail
-
AbstractHistoricalQueue
protected AbstractHistoricalQueue(HistoryManager historyManager, Q queue)
Constructor.- Parameters:
historyManager
- HistoryManager; history managerqueue
- Q; initial queue
-
-