jtentor

LinkedList 1er parte - ILinkedList.java

Oct 17th, 2020
1,135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.70 KB | None | 0 0
  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.  
Add Comment
Please, Sign In to add comment