Returns a view of a Deque
as a Last-in-first-out (Lifo)
Queue
. Method add
is mapped to push
,
remove
is mapped to pop
and so on. This
view can be useful when you would like to use a method
requiring a Queue
but you need Lifo ordering.
Each method invocation on the queue returned by this method
results in exactly one method invocation on the backing deque, with
one exception. The addAll
method is
implemented as a sequence of addFirst
invocations on the backing deque.
<T> | the class of the objects in the deque | |
deque | the deque |
Diagram: Collections