// A class that implements the IntList interface stores a list of integers. // The interface just specifies the methods that a list must have, // not how they are implemented (that is up to the class authors). // // Clients can declare variables and parameters of type IntList // so that the same code can interact with any type of list. // This idea is called polymorphism. public interface List { public void add(E value); public void add(int index, E value); public void clear(); public E get(int index); public int indexOf(E value); public boolean isEmpty(); public void remove(int index); public void set(int index, E value); public int size(); }