Some important actions linked list

LinkedList common actions (implemented List \ Deque) :( ArrayList has written not repeated)
constructor:
LinkedList ();
LinkedList (Collection C);
common methods:
void the addFirst (); head insertion
void addLast (); tail plug
E getFirst (); get the first element
E getLast (); Gets the last element
E peek (); retrieves, but does not delete the first element
E peekFirst (); retrieves, but does not delete the first element
E peekLast (); retrieving but does not delete the last element
E poll (); retrieve and remove the first element
E pollFirst (); retrieve and remove the first element
E pollLast (); retrieves and deletes the last element of the
void push (E e); the elements into a first position in the sequence table

Guess you like

Origin blog.51cto.com/14232274/2433820