coltginy
Class IntLinkedList

java.lang.Object
coltginy.IntLinkedList
- public class IntLinkedList
- extends java.lang.Object
A singly-linked list consisting of int values.
|
Constructor Summary |
IntLinkedList()
Constructs an empty list. |
IntLinkedList(int[] elements)
Constructs a list containing the specified elements. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
first
protected IntLinkedList.Entry first
last
protected IntLinkedList.Entry last
size
protected int size
IntLinkedList
public IntLinkedList()
- Constructs an empty list.
IntLinkedList
public IntLinkedList(int[] elements)
- Constructs a list containing the specified elements.
first
public IntLinkedList.Entry first()
last
public IntLinkedList.Entry last()
size
public int size()
isEmpty
public boolean isEmpty()
add
public void add(int value)
delete
public void delete(int value)
- Delete the first element in this list that is identical to the given
element.
elements
public int[] elements()