@Test public void testEnqueue() { queue.enqueue(11); Assert.assertEquals(CircularQueue.DEFAULT_CAPACITY, queue.capacity()); Assert.assertEquals(1, queue.size()); }
public int enqueue(int element) { if (isCapacityFull()) { resize(); } queue[++end] = element; return element; }
CircularQueue { public int enqueue(int element) { if (isCapacityFull()) { resize(); } queue[++end] = element; return element; } }
CircularQueue { public int enqueue(int element) { if (isCapacityFull()) { resize(); } queue[++end] = element; return element; } CircularQueue();  CircularQueue(final int capacity); }
CircularQueue { public int enqueue(int element) { if (isCapacityFull()) { resize(); } queue[++end] = element; return element; } CircularQueue();  CircularQueue(final int capacity); int size(); int capacity(); int enqueue(int element); int dequeue(); boolean isEmpty(); }
CircularQueue { public int enqueue(int element) { if (isCapacityFull()) { resize(); } queue[++end] = element; return element; } CircularQueue();  CircularQueue(final int capacity); int size(); int capacity(); int enqueue(int element); int dequeue(); boolean isEmpty(); static final Logger LOGGER; static final int DEFAULT_CAPACITY; }