@Test public void testMoveToEnd() { CircularList<Integer> list = new CircularList<Integer>(); int valueCount = 10; for (int i = 0; i < valueCount; i++) { list.add(new Integer(i)); } assertEquals(new Integer(valueCount - 1), list.getTop()); list.moveToEnd(); assertEquals(new Integer(valueCount - 2), list.getTop()); for (int i = 0; i < valueCount - 1; i++) { list.getNext(); } assertEquals(new Integer(valueCount - 1), list.getTop()); for (int i = 0; i < valueCount; i++) { list.moveToEnd(); } assertEquals(new Integer(valueCount - 1), list.getTop()); }
public void moveToEnd() { incrementPos(); }
CircularList { public void moveToEnd() { incrementPos(); } }
CircularList { public void moveToEnd() { incrementPos(); } CircularList(int initialCapacity);  CircularList();  CircularList(List<E> list);  CircularList(Collection<E> list); }
CircularList { public void moveToEnd() { incrementPos(); } CircularList(int initialCapacity);  CircularList();  CircularList(List<E> list);  CircularList(Collection<E> list); void add(E element); E getTop(); E getTail(); E getNext(); void moveToEnd(); void moveToMid(); E removeTop(); boolean remove(E element); int size(); boolean isEmpty(); @Override String toString(); List<E> asList(); }
CircularList { public void moveToEnd() { incrementPos(); } CircularList(int initialCapacity);  CircularList();  CircularList(List<E> list);  CircularList(Collection<E> list); void add(E element); E getTop(); E getTail(); E getNext(); void moveToEnd(); void moveToMid(); E removeTop(); boolean remove(E element); int size(); boolean isEmpty(); @Override String toString(); List<E> asList();  }