Wednesday, October 17, 2018

Interface for a List ADT(Abstract Data Type)


package com.ds.adt.list;

/**
 * List interface includes all the methods that needs to be implemented by 
 * List type ADTs such as ArrayList, LinkedList, DoublyLinkedList etc.  
 * 
 * @author Pritam Banerjee
 * @version 15 October 2018
 */
public interface List<T> {

    public void add(T data);

    public void insert(T data, int position);

    public T get(int position);

    public void remove(T data);

    public void remove(int position);

    public void removeAll(List<T> data);

    public int size();
}

No comments:

Post a Comment