@Test(groups = "1s", timeOut=60000) public void testEquals() { CircularQueue<Integer> a = create(); CircularQueue<Integer> b = create(); a.addFirst(1); assertEquals(a.equals(b), a == b); assertNotEquals(a, b); b.addFirst(2); assertEquals(a.equals(b), a == b); assertNotEquals(a, b); assertEquals(a, a); }
public boolean addFirst(E e) { elementData[head = convert(head, -1)] = e; size++; if (head == tail) doubleCapacity(); return true; }
CircularQueue { public boolean addFirst(E e) { elementData[head = convert(head, -1)] = e; size++; if (head == tail) doubleCapacity(); return true; } }
CircularQueue { public boolean addFirst(E e) { elementData[head = convert(head, -1)] = e; size++; if (head == tail) doubleCapacity(); return true; } @SuppressWarnings({"unchecked"})  CircularQueue(int size); }
CircularQueue { public boolean addFirst(E e) { elementData[head = convert(head, -1)] = e; size++; if (head == tail) doubleCapacity(); return true; } @SuppressWarnings({"unchecked"})  CircularQueue(int size); boolean isEmpty(); void clear(); int size(); E get(int index); boolean addFirst(E e); boolean addLast(E e); int indexOf(E elem); E pollFirst(); E pollLast(); E remove(); E remove(int index); boolean remove(E e); }
CircularQueue { public boolean addFirst(E e) { elementData[head = convert(head, -1)] = e; size++; if (head == tail) doubleCapacity(); return true; } @SuppressWarnings({"unchecked"})  CircularQueue(int size); boolean isEmpty(); void clear(); int size(); E get(int index); boolean addFirst(E e); boolean addLast(E e); int indexOf(E elem); E pollFirst(); E pollLast(); E remove(); E remove(int index); boolean remove(E e);  }