dsa

Data Structures & Algorithms - Spring 2018
Log | Files | Refs | README

ListInterface.java (532B)


      1 package lab8;
      2 
      3 // ********************************************************
      4 // Interface ListInterface for the ADT list.
      5 // *********************************************************
      6 public interface ListInterface<T>
      7 {
      8     boolean isEmpty();
      9     int size();
     10     void add(int index, T item)
     11             throws ListIndexOutOfBoundsException;
     12     T get(int index)
     13             throws ListIndexOutOfBoundsException;
     14     void remove(int index)
     15             throws ListIndexOutOfBoundsException;
     16     void removeAll();
     17 }  // end ListInterface