public interface LinkedListInterface> { /** * The number of items in the linked list * * @return the number of items in the linked list */ int size(); /** * Returns true iff the linked list has no elements * * @return true iff the linked list has no elements */ boolean isEmpty(); /** * Get the first element in the linked list * * @return the first element in the linked list or null is the list is empty */ Comparable first(); /** * The last element in the linked list * * @return the last elment or null is the list is empty */ Comparable last(); /** * Add an element at the end of the list * * @param c the element to be added */ void addLast(Comparable c); /** * Add a element at the front of the list * * @param c the Element to be added */ void addFirst(Comparable c); /** * Remove the first element from the list * * @return the first element, or null if the list is empty */ Comparable removeFirst(); /** * Remove the last element from the list * * @return the last element, or null if the list is empty */ Comparable removeLast(); /** * Remove the specified element from the list * * @param r the element to be removed * @return the removed element, or null is the element was not in the list */ Comparable remove(Comparable r); /** * Find a element in the list by its iD * * @param iD * @return the found element or null if a match could not be found */ Comparable find(Comparable iD); }