/** * Copyright (c): Uwe Schmidt, FH Wedel * * You may study, modify and distribute this source code * FOR NON-COMMERCIAL PURPOSES ONLY. * This copyright message has to remain unchanged. * * Note that this document is provided 'as is', * WITHOUT WARRANTY of any kind either expressed or implied. */ package ds.interfaces; /** Simple interface for lists */ import java.util.Iterator; import ds.util.Invariant; import ds.util.E; public interface List extends Iterable, Invariant { boolean isEmpty(); boolean member(E e); int length(); E head(); List tail(); E last(); List init(); E at(int i); List append(E e); List cons(E e); List concat(List l2); List reverse(); List copy(); // inherited // Iterator iterator(); // boolean inv(); }