public interface One_Way_List { // This interface describes a one way linked list that allows inserts at any position, removals from //any position, a way to move through the list and other capabilities as indicated // Every implementation will need to provide a structure to hold the list items //This structure usually consists of one part that holds data and one or more parts //that allow access to the item that follows and is linked to the given item // A position is understood to have two parts: the part already travered, i.e., // the part to the left of the current position and // the part to the right of the current position, including the current. public class ListPosition { // a new type defined by the One_Way_List class } public abstract void insert(int x); //put a new entry into the list at the current position public abstract int remove ( ); // return the item at the current position, removing it from the list public abstract void advance ( ); // move to the right one place public abstract void reset ( ); // go to the beginning of the list public abstract int lengthOfRemainder( ); // returns the number of entries in the part of the list following the current position public abstract void swapRemainders (ListPosition LP ); // //public abstact compareTo( ) // provide the comparison function needed }