package labs.arraylist;

/**
 * A simple list interface.
 */
public interface SimpleList<E> {

  /**
   * Adds the specified element to the end of this list.
   * @param e the element to add
   */
  void add(E e);

  /**
   * Returns the element at the specified position in this list.
   * @param index the index of the element to return
   * @return the element at the specified position in this list
   */
  E get(int index);

  /**
   * Removes the element at the specified position in this list.
   * @param index the index of the element to remove
   */
  void remove(int index);

  /**
   * Returns true if this list contains the specified element.
   * @param e the element to check for
   * @return true if this list contains the specified element
  */
  boolean contains(E e);

  /**
   * Removes all of the elements from this list.
   */
  void clear();

  /**
   * Returns the number of elements in this list.
   * @return the number of elements in this list
   */
  int size();
}
