dsa

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

ListInterface.java (539B)


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