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-2018 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(org.djunits.value.vdouble.scalar.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, subListaddAll, clear, contains, containsAll, fill, fill, getCollection, isEmpty, iterator, removeAll, retainAll, size, toArray, toArrayaddEvent, cleanUpHistory, getEvent, getEvents, getLastEvent, isLastState, now, removeEventclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitremoveIfaddAll, clear, containsAll, equals, hashCode, isEmpty, parallelStream, removeAll, retainAll, spliterator, stream, toArray, toArrayreplaceAll, sortpublic HistoricalLinkedList(HistoryManager historyManager)
historyManager - HistoryManager; history managerpublic HistoricalLinkedList(HistoryManager historyManager, Collection<? extends E> c)
historyManager - HistoryManager; history managerc - Collection; 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(org.djunits.value.vdouble.scalar.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–2018 Delft University of Technology. All rights reserved.