All Packages Class Hierarchy This Package Previous Next Index
Class simula.simset.Head
java.lang.Object
|
+----simula.simset.Linkage
|
+----simula.simset.Head
- public class Head
- extends Linkage
This class implements a double-linked list.
-
Head()
- Initialize an empty list.
-
cardinal()
- Returns the number of elements of the list.
-
clear()
- Clears the list.
-
empty()
- Returns
True
if the list is empty, False
otherwise
-
first()
- Returns the first element of the list.
-
first(Link)
- Sets the first element of the list.
-
last()
- Returns the last element of the list.
-
last(Link)
- Sets the last element of the list.
Head
public Head()
- Initialize an empty list.
cardinal
public int cardinal()
- Returns the number of elements of the list.
- Returns:
- the number of elements of the list.
clear
public void clear()
- Clears the list.
empty
public boolean empty()
- Returns
True
if the list is empty, False
otherwise
- Returns:
- True if the list is empty.
first
public Link first()
- Returns the first element of the list.
- Returns:
- the first element of the list.
first
protected void first(Link _first)
- Sets the first element of the list.
- Parameters:
- _first - the new element to be first.
last
public Link last()
- Returns the last element of the list.
- Returns:
- the last element of the list.
last
protected void last(Link _last)
- Sets the last element of the list.
- Parameters:
- _last - the new element to be last.
All Packages Class Hierarchy This Package Previous Next Index