/**
 * A super-simplified version the Java List interface.
 * For the actual interface's source code, see
 * 
 * https://github.com/openjdk/jdk/blob/master/src/java.base/share/classes/java/util/List.java
 */
public interface List {
/** * Returns the element at the specified index. * @param index the position from which to return an element. */
E get(int index);
/** * Appends the specified element to the end of the list. * @param e element to be appended to this list. */ void add(E e); /** * Inserts the specified element at the specified position in this list. Shifts the element currently at that position (if any) * and any subsequent elements to the right. * * @param index index at which the specified element is to be inserted. * @param e element to be inserted. */ void add(int index, E e); /** * Removes the first occurrence of the specified element from this list. * * @param e The element to be removed from this list, if present. * @return {@code true} if this list contained the specified element. */ boolean remove(E e); /** * Removes the element at the specified position in this list. * Shifts any subsequent elements to the left. * * @param index the index of the element to be removed. * @return the element at the previously specified position. */ E remove(int index); /** * Returns {@code true} if this list contains the specified element. * * @param e element whose presence in this list is to be tested. * @return {@code true} if this list contains the specified element. */ boolean contains(E e); /** * Returns the number of elements in this list. * @return the number of elements in this list. */ int size(); }