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.


Constructor Index

 o Head()
Initialize an empty list.

Method Index

 o cardinal()
Returns the number of elements of the list.
 o clear()
Clears the list.
 o empty()
Returns True if the list is empty, False otherwise
 o first()
Returns the first element of the list.
 o first(Link)
Sets the first element of the list.
 o last()
Returns the last element of the list.
 o last(Link)
Sets the last element of the list.

Constructors

 o Head
 public Head()
Initialize an empty list.

Methods

 o cardinal
 public int cardinal()
Returns the number of elements of the list.

Returns:
the number of elements of the list.
 o clear
 public void clear()
Clears the list.

 o empty
 public boolean empty()
Returns True if the list is empty, False otherwise

Returns:
True if the list is empty.
 o first
 public Link first()
Returns the first element of the list.

Returns:
the first element of the list.
 o first
 protected void first(Link _first)
Sets the first element of the list.

Parameters:
_first - the new element to be first.
 o last
 public Link last()
Returns the last element of the list.

Returns:
the last element of the list.
 o 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