E
- element typepublic class HistoricalLinkedList<E> extends AbstractHistoricalList<E,LinkedList<E>> implements HistoricalDeque<E>
Iterator
returned by this class does not support the remove()
, add()
and set()
methods.
Any returned sublist 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.
AbstractHistoricalList.AddEvent<E,L extends List<E>>, AbstractHistoricalList.EventList<E,L extends List<E>>, AbstractHistoricalList.RemoveEvent<E,L extends List<E>>
AbstractHistoricalCollection.EventCollection<E,C extends Collection<E>>
AbstractHistorical.EventValue<T>
Constructor and Description |
---|
HistoricalLinkedList(HistoryManager historyManager)
Constructor.
|
HistoricalLinkedList(HistoryManager historyManager,
Collection<? extends E> c)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addFirst(E e) |
void |
addLast(E e) |
Iterator<E> |
descendingIterator()
This implementation copies a list and reverses the order before returning the iterator. |
E |
element() |
LinkedList<E> |
get()
Returns the current deque.
|
LinkedList<E> |
get(Time time)
Returns a past deque.
|
E |
getFirst() |
E |
getLast() |
boolean |
offer(E e) |
boolean |
offerFirst(E e) |
boolean |
offerLast(E e) |
E |
peek() |
E |
peekFirst() |
E |
peekLast() |
E |
poll() |
E |
pollFirst() |
E |
pollLast() |
E |
pop() |
void |
push(E e) |
E |
remove() |
E |
removeFirst() |
boolean |
removeFirstOccurrence(Object o) |
E |
removeLast() |
boolean |
removeLastOccurrence(Object o) |
String |
toString() |
add, add, addAll, get, indexOf, lastIndexOf, listIterator, listIterator, remove, remove, set, subList
addAll, clear, contains, containsAll, fill, fill, getCollection, isEmpty, iterator, removeAll, retainAll, size, toArray, toArray
addEvent, cleanUpHistory, getEvent, getEvents, getLastEvent, isLastState, now, removeEvent
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
removeIf
addAll, clear, containsAll, equals, hashCode, isEmpty, parallelStream, removeAll, retainAll, spliterator, stream, toArray, toArray
replaceAll, sort
public HistoricalLinkedList(HistoryManager historyManager)
historyManager
- HistoryManager; history managerpublic HistoricalLinkedList(HistoryManager historyManager, Collection<? extends E> c)
historyManager
- HistoryManager; history managerc
- Collection<? extends E>; initial collectionpublic LinkedList<E> get()
get
in interface HistoricalCollection<E>
get
in interface HistoricalDeque<E>
get
in interface HistoricalList<E>
get
in interface HistoricalQueue<E>
public LinkedList<E> get(Time time)
get
in interface HistoricalCollection<E>
get
in interface HistoricalDeque<E>
get
in interface HistoricalList<E>
get
in interface HistoricalQueue<E>
time
- Time; time to obtain the deque atpublic boolean offer(E e)
public E remove()
public E removeFirst()
removeFirst
in interface Deque<E>
public E poll()
public boolean offerFirst(E e)
offerFirst
in interface Deque<E>
public E removeLast()
removeLast
in interface Deque<E>
public boolean removeFirstOccurrence(Object o)
removeFirstOccurrence
in interface Deque<E>
public boolean removeLastOccurrence(Object o)
removeLastOccurrence
in interface Deque<E>
public E element()
public E peek()
public Iterator<E> descendingIterator()
descendingIterator
in interface Deque<E>
Copyright © 2014–2019 Delft University of Technology. All rights reserved.