@Test public void testMoveBeneath() throws Exception { }
public boolean moveBeneath(ElementType objectToMove, ElementType reference) { if (objectToMove == reference) { throw new IllegalArgumentException("Illegal argument to moveBeaneath(A, B); A cannot be equal to B."); } list.remove(objectToMove); int refIndex = list.indexOf(reference); list.add(refIndex, objectToMove); return true; }
ListOrganizer implements ZIndexable<ElementType> { public boolean moveBeneath(ElementType objectToMove, ElementType reference) { if (objectToMove == reference) { throw new IllegalArgumentException("Illegal argument to moveBeaneath(A, B); A cannot be equal to B."); } list.remove(objectToMove); int refIndex = list.indexOf(reference); list.add(refIndex, objectToMove); return true; } }
ListOrganizer implements ZIndexable<ElementType> { public boolean moveBeneath(ElementType objectToMove, ElementType reference) { if (objectToMove == reference) { throw new IllegalArgumentException("Illegal argument to moveBeaneath(A, B); A cannot be equal to B."); } list.remove(objectToMove); int refIndex = list.indexOf(reference); list.add(refIndex, objectToMove); return true; } ListOrganizer(List<ElementType> list); }
ListOrganizer implements ZIndexable<ElementType> { public boolean moveBeneath(ElementType objectToMove, ElementType reference) { if (objectToMove == reference) { throw new IllegalArgumentException("Illegal argument to moveBeaneath(A, B); A cannot be equal to B."); } list.remove(objectToMove); int refIndex = list.indexOf(reference); list.add(refIndex, objectToMove); return true; } ListOrganizer(List<ElementType> list); boolean moveToTop(ElementType element); boolean moveAbove(ElementType objectToMove, ElementType reference); boolean moveBeneath(ElementType objectToMove, ElementType reference); boolean moveToBottom(ElementType key); boolean moveUp(ElementType key); boolean moveDown(ElementType key); @Override List<ElementType> elements(); void addToBottom(ElementType element); void addToTop(ElementType element); }
ListOrganizer implements ZIndexable<ElementType> { public boolean moveBeneath(ElementType objectToMove, ElementType reference) { if (objectToMove == reference) { throw new IllegalArgumentException("Illegal argument to moveBeaneath(A, B); A cannot be equal to B."); } list.remove(objectToMove); int refIndex = list.indexOf(reference); list.add(refIndex, objectToMove); return true; } ListOrganizer(List<ElementType> list); boolean moveToTop(ElementType element); boolean moveAbove(ElementType objectToMove, ElementType reference); boolean moveBeneath(ElementType objectToMove, ElementType reference); boolean moveToBottom(ElementType key); boolean moveUp(ElementType key); boolean moveDown(ElementType key); @Override List<ElementType> elements(); void addToBottom(ElementType element); void addToTop(ElementType element);  }