Class ConcurrentDequeWrapper<E,W extends Deque<E>>

All Implemented Interfaces:
Iterable<E>, Collection<E>, Deque<E>, Queue<E>, SizedCollection

public class ConcurrentDequeWrapper<E,W extends Deque<E>> extends ConcurrentQueueWrapper<E,W> implements Deque<E>
  • Constructor Details

    • ConcurrentDequeWrapper

      protected ConcurrentDequeWrapper(@NotNull W wrapped, @NotNull @NotNull Lock readLock, @NotNull @NotNull Lock writeLock)
  • Method Details

    • create

      @NotNull public static <E> @NotNull Deque<E> create(@NonNull @NonNull Deque<E> wrapped)
    • addFirst

      public void addFirst(E e)
      Specified by:
      addFirst in interface Deque<E>
    • addLast

      public void addLast(E e)
      Specified by:
      addLast in interface Deque<E>
    • offerFirst

      public boolean offerFirst(E e)
      Specified by:
      offerFirst in interface Deque<E>
    • offerLast

      public boolean offerLast(E e)
      Specified by:
      offerLast in interface Deque<E>
    • removeFirst

      public E removeFirst()
      Specified by:
      removeFirst in interface Deque<E>
    • removeLast

      public E removeLast()
      Specified by:
      removeLast in interface Deque<E>
    • pollFirst

      public E pollFirst()
      Specified by:
      pollFirst in interface Deque<E>
    • pollLast

      public E pollLast()
      Specified by:
      pollLast in interface Deque<E>
    • getFirst

      public E getFirst()
      Specified by:
      getFirst in interface Deque<E>
    • getLast

      public E getLast()
      Specified by:
      getLast in interface Deque<E>
    • peekFirst

      public E peekFirst()
      Specified by:
      peekFirst in interface Deque<E>
    • peekLast

      public E peekLast()
      Specified by:
      peekLast in interface Deque<E>
    • removeFirstOccurrence

      public boolean removeFirstOccurrence(Object o)
      Specified by:
      removeFirstOccurrence in interface Deque<E>
    • removeLastOccurrence

      public boolean removeLastOccurrence(Object o)
      Specified by:
      removeLastOccurrence in interface Deque<E>
    • push

      public void push(E e)
      Specified by:
      push in interface Deque<E>
    • pop

      public E pop()
      Specified by:
      pop in interface Deque<E>
    • descendingIterator

      @NotNull public @NotNull Iterator<E> descendingIterator()
      Specified by:
      descendingIterator in interface Deque<E>