package listes; /** simple toy lists */ import java.io.*; import java.util.*; public interface SimpleList { /** adds object o at first position */ public void addFirst(Object o); /** adds object o at last position */ public void addLast(Object o); /** returns the number of elements */ public int length(); /** emptyness test */ public boolean isEmpty(); /** enumeration */ public Enumeration elements(); /** executes some task for each item of the sequence */ public void forEach (Task t) throws ImpossibleException; /** executes some task for each item of the sequence, whenever possible */ public void forEachTry(Task t); /** prints each item of the list on stm */ public void listing(PrintStream stm); /** prints each item of the list on Sytem.out */ public void listing(); }