Class AbstractHistoricalNavigableSet<E,S extends NavigableSet<E>>
java.lang.Object
org.opentrafficsim.core.perception.AbstractHistorical<E,AbstractHistoricalCollection.EventCollection<E,C>>
org.opentrafficsim.core.perception.collections.AbstractHistoricalCollection<E,S>
org.opentrafficsim.core.perception.collections.AbstractHistoricalSortedSet<E,S>
org.opentrafficsim.core.perception.collections.AbstractHistoricalNavigableSet<E,S>
- Type Parameters:
E- element typeS- navigable set type
- All Implemented Interfaces:
Iterable<E>,Collection<E>,NavigableSet<E>,Set<E>,SortedSet<E>,HistoricalCollection<E>,HistoricalNavigableSet<E>,HistoricalSet<E>,HistoricalSortedSet<E>,HistoryManager.HistoricalElement
- Direct Known Subclasses:
HistoricalTreeSet
public abstract class AbstractHistoricalNavigableSet<E,S extends NavigableSet<E>> extends AbstractHistoricalSortedSet<E,S> implements HistoricalNavigableSet<E>
NavigableSet-valued historical state. The current navigable set is always maintained, and past states of the navigable set
are obtained by applying the events between now and the requested time in reverse.
The
The
Iterator returned by this class does not support the remove() method. Any returned subset is
unmodifiable.
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.
- Version:
- $Revision$, $LastChangedDate$, by $Author$, initial version 2 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 protectedAbstractHistoricalNavigableSet(HistoryManager historyManager, S set)Constructor. -
Method Summary
Modifier and Type Method Description Eceiling(E e)Iterator<E>descendingIterator()NavigableSet<E>descendingSet()Efloor(E e)NavigableSet<E>headSet(E toElement, boolean inclusive)Ehigher(E e)Elower(E e)EpollFirst()EpollLast()NavigableSet<E>subSet(E fromElement, boolean fromInclusive, E toElement, boolean toInclusive)NavigableSet<E>tailSet(E fromElement, boolean inclusive)StringtoString()Methods inherited from class org.opentrafficsim.core.perception.collections.AbstractHistoricalSortedSet
comparator, first, headSet, last, subSet, tailSetMethods inherited from class org.opentrafficsim.core.perception.collections.AbstractHistoricalCollection
add, addAll, clear, contains, containsAll, fill, fill, getCollection, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArrayMethods inherited from class org.opentrafficsim.core.perception.AbstractHistorical
addEvent, cleanUpHistory, getEvent, getEvents, getLastEvent, isLastState, now, removeEventMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.opentrafficsim.core.perception.collections.HistoricalCollection
removeIfMethods inherited from interface org.opentrafficsim.core.perception.collections.HistoricalNavigableSet
get, get
-
Constructor Details
-
AbstractHistoricalNavigableSet
Constructor.- Parameters:
historyManager- HistoryManager; history managerset- S; initial set
-
-
Method Details
-
toString
-
pollFirst
- Specified by:
pollFirstin interfaceNavigableSet<E>
-
pollLast
- Specified by:
pollLastin interfaceNavigableSet<E>
-
lower
- Specified by:
lowerin interfaceNavigableSet<E>
-
floor
- Specified by:
floorin interfaceNavigableSet<E>
-
ceiling
- Specified by:
ceilingin interfaceNavigableSet<E>
-
higher
- Specified by:
higherin interfaceNavigableSet<E>
-
descendingSet
- Specified by:
descendingSetin interfaceNavigableSet<E>
-
descendingIterator
- Specified by:
descendingIteratorin interfaceNavigableSet<E>
-
subSet
public NavigableSet<E> subSet(E fromElement, boolean fromInclusive, E toElement, boolean toInclusive)- Specified by:
subSetin interfaceNavigableSet<E>
-
headSet
- Specified by:
headSetin interfaceNavigableSet<E>
-
tailSet
- Specified by:
tailSetin interfaceNavigableSet<E>
-