import java.util.List;

public class ListTimer extends CollectionTimer {
    private  List<Integer> list;

    public ListTimer(List<Integer> list) {
        this.list = list;
    }

    /* Constructor that creates a ListTimer instance for the given list.
     * Parameters:
     * list - instance of the data structure that is to be benchmarked
     * */

    public ListTimer(List<Integer> list, long elemGenSeed) {
        super(elemGenSeed);
        this.list = list;
    }

    /* Constructor that creates a ListTimer instance for the given list that
     * will populate it with data generated using the specified seed.
     * Parameters:
     *   list - instance of the list that is to be benchmarked
     *   elemGenSeed - seed for the generator of random elements.*/

    public ListTimer(List<Integer> list, Long elemGenSeed) {
        super((long)elemGenSeed);
        this.list = list;
    }

    public void addElement(Integer elem) {
        list.add(elem);
    }

    public void removeElement() throws RuntimeException {
        list.remove(0);
    }

    public int getSize() {
        return list.size();
    }

    public boolean isEmpty() {
        return list.isEmpty();
    }
}
