jtentor

LinkedList 1er parte - ILinkedList.java

Oct 17th, 2020
276
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //
  2. // Created by Julio Tentor <jtentor@fi.unju.edu.ar>
  3. //
  4.  
  5. // from https://docs.oracle.com/en/java/javase/15/docs/api/java.base/java/util/LinkedList.html
  6. public interface ILinkedList<ELEMENT> extends Iterable<ELEMENT> {
  7.  
  8.     // Returns the number of elements in this list.
  9.     public int size();
  10.  
  11.     // Inserts the specified element at the beginning of this list.
  12.     public void addFirst(ELEMENT item);
  13.     // Appends the specified element to the end of this list.
  14.     public void addLast(ELEMENT item);
  15.     // Removes and returns the first element from this list.
  16.     public ELEMENT removeFirst();
  17.     // Removes and returns the last element from this list.
  18.     public ELEMENT removeLast();
  19.  
  20. }
  21.  
RAW Paste Data Copied