public class SortedSinglyLinkedList<E extends java.lang.Comparable<? super E>>
extends java.lang.Object
Constructor and Description |
---|
SortedSinglyLinkedList() |
Modifier and Type | Method and Description |
---|---|
void |
add(E content) |
void |
clear() |
boolean |
contains(E value)
Finds the first occurrence of an item.
|
boolean |
isEmpty() |
static void |
main(java.lang.String[] args) |
E |
remove(E value)
Removes the first occurrence of an item.
|
E |
removeFromHead() |
E |
removeFromTail() |
int |
size() |
E[] |
toArray(E[] a) |
public void add(E content)
public E removeFromHead()
public E removeFromTail()
public boolean contains(E value)
value
- the item to search for.public E remove(E value)
value
- the item to remove.public boolean isEmpty()
public int size()
public void clear()
public static void main(java.lang.String[] args)