1package ds.interfaces;
2
3
4
5
6import java.util.Iterator;
7
8import ds.util.Invariant;
9import ds.util.E;
10
11public interface List
12 extends Iterable<E>, Invariant {
13
14 boolean isEmpty();
15 boolean member(E e);
16 int length();
17 E head();
18 List tail();
19 E last();
20 List init();
21 E at(int i);
22 List append(E e);
23 List cons(E e);
24 List concat(List l2);
25 List reverse();
26 List copy();
27
28
29
30
31
32}