@Test public void testOffer() { queue.offer("hello"); queue.offer("world"); assertEquals("hello", queue.poll()); assertEquals("world", queue.poll()); }
public boolean offer(E o) { return add(o); }
SimpleBoundedQueue extends AbstractQueue<E> { public boolean offer(E o) { return add(o); } }
SimpleBoundedQueue extends AbstractQueue<E> { public boolean offer(E o) { return add(o); } SimpleBoundedQueue(int maxSize); }
SimpleBoundedQueue extends AbstractQueue<E> { public boolean offer(E o) { return add(o); } SimpleBoundedQueue(int maxSize); @Override boolean add(E obj); E pop(); @Override int size(); int remainingCapacity(); boolean offer(E o); E peek(); E poll(); @Override void clear(); @Override Iterator<E> iterator(); }
SimpleBoundedQueue extends AbstractQueue<E> { public boolean offer(E o) { return add(o); } SimpleBoundedQueue(int maxSize); @Override boolean add(E obj); E pop(); @Override int size(); int remainingCapacity(); boolean offer(E o); E peek(); E poll(); @Override void clear(); @Override Iterator<E> iterator();  }