/** * Lists that change. * * @author Samuel A. Rebelsky * @author Yvonne Palm * @author Jonathan "Don't I get to make suggestions, too?" Wellons * * * * @author "Better Never Than Late" Leach */ public interface MutableList { /** * Determine if the list is empty */ public boolean isEmpty(); /** * Update the list by adding an element to the front. */ public void addToFront(Object newThingy); /** * Update the list by removing the first element. Return * that element. */ public Object removeFirst() throws Exception; /** * Get the length. */ public int length(); /** * Get the first element (non-destructively). */ public Object getFirst() throws Exception; /** * Convert to a string for ease of printing. */ public String toString(); /** * Make an independent copy of this list. */ public MutableList copyMe(); } // interface MutableList