@Test public void testMoveDown() throws Exception { }
public boolean moveDown(ElementType key) { int widgetIndex = list.indexOf(key); if(widgetIndex == -1) { return false; } if(widgetIndex <= 0) { return true; } ElementType widgetBeneath = list.get(widgetIndex-1); return moveBeneath(key, widgetBeneath); }
ListOrganizer implements ZIndexable<ElementType> { public boolean moveDown(ElementType key) { int widgetIndex = list.indexOf(key); if(widgetIndex == -1) { return false; } if(widgetIndex <= 0) { return true; } ElementType widgetBeneath = list.get(widgetIndex-1); return moveBeneath(key, widgetBeneath); } }
ListOrganizer implements ZIndexable<ElementType> { public boolean moveDown(ElementType key) { int widgetIndex = list.indexOf(key); if(widgetIndex == -1) { return false; } if(widgetIndex <= 0) { return true; } ElementType widgetBeneath = list.get(widgetIndex-1); return moveBeneath(key, widgetBeneath); } ListOrganizer(List<ElementType> list); }
ListOrganizer implements ZIndexable<ElementType> { public boolean moveDown(ElementType key) { int widgetIndex = list.indexOf(key); if(widgetIndex == -1) { return false; } if(widgetIndex <= 0) { return true; } ElementType widgetBeneath = list.get(widgetIndex-1); return moveBeneath(key, widgetBeneath); } 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 moveDown(ElementType key) { int widgetIndex = list.indexOf(key); if(widgetIndex == -1) { return false; } if(widgetIndex <= 0) { return true; } ElementType widgetBeneath = list.get(widgetIndex-1); return moveBeneath(key, widgetBeneath); } 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);  }