@Test public void testPeekEmptyQueue() { CapacityQueue<Integer> queue = new CapacityQueue<>(DEFAULT_CAPACITY, DEFAULT_DROP_POLICY); assertThat(queue.peek()).isNull(); }
@Override public E peek() { return mDeque.peekFirst(); }
CapacityQueue extends AbstractQueue<E> { @Override public E peek() { return mDeque.peekFirst(); } }
CapacityQueue extends AbstractQueue<E> { @Override public E peek() { return mDeque.peekFirst(); } CapacityQueue(int maxCapacity, @DropPolicy int dropPolicy); }
CapacityQueue extends AbstractQueue<E> { @Override public E peek() { return mDeque.peekFirst(); } CapacityQueue(int maxCapacity, @DropPolicy int dropPolicy); @Override int size(); @Override boolean offer(E e); @Override E poll(); @Override E peek(); @Override @NonNull Iterator<E> iterator(); }
CapacityQueue extends AbstractQueue<E> { @Override public E peek() { return mDeque.peekFirst(); } CapacityQueue(int maxCapacity, @DropPolicy int dropPolicy); @Override int size(); @Override boolean offer(E e); @Override E poll(); @Override E peek(); @Override @NonNull Iterator<E> iterator();  }