import java.util.List;

public class ListTimer extends CollectionTimer
{
        private  List<Integer> list;

        public ListTimer(List<Integer> list1)
        {
                list = list1;
        }
        /*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> list1, long elemGenSeed)
        {
                super( elemGenSeed );
                list = list1;		
        }

        /*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> list1, Long elemGenSeed)
        {
          super((long)elemGenSeed);
                list = list1;		
        }

        public void addElement(Integer elem)
        {
                list.add(elem);
        }

        public void removeElement()
        {
          if (!isEmpty())
            list.remove(0);
        }

        public int getSize()
        {
                return list.size();		
        }

        public boolean isEmpty()
        {
                return list.isEmpty();
        }
}
