@Test public void testSize() { queue.add("hello"); assertEquals(1, queue.size()); queue.add("world"); assertEquals(2, queue.size()); }
@Override public int size() { return size; }
SimpleBoundedQueue extends AbstractQueue<E> { @Override public int size() { return size; } }
SimpleBoundedQueue extends AbstractQueue<E> { @Override public int size() { return size; } SimpleBoundedQueue(int maxSize); }
SimpleBoundedQueue extends AbstractQueue<E> { @Override public int size() { return size; } 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> { @Override public int size() { return size; } 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();  }