All Packages Class Hierarchy This Package Previous Next Index
Class simset.Head
java.lang.Object
|
+----simset.Linkage
|
+----simset.Head
- public class Head
- extends simset.Linkage
This class is used for representing circular two-way lists.
Items in a list are represented by objects of class Link,
or more usefully, subclasses of Link.
- See Also:
- simset.Link, simset.Linkage
-
Head()
-
-
cardinal()
- Returns the number of items currently in this list.
-
clear()
- Removes all items from this list.
-
empty()
- Tests if this list is empty.
-
first()
- Returns the first item in this list.
-
last()
- Returns the last item in this list.
Head
public Head()
first
public final simset.Link first()
- Returns the first item in this list.
- Returns:
- The first item.
last
public final simset.Link last()
- Returns the last item in this list.
- Returns:
- The last item.
empty
public final boolean empty()
- Tests if this list is empty.
- Returns:
- true, if this list is empty; false otherwise.
cardinal
public final int cardinal()
- Returns the number of items currently in this list.
- Returns:
- The number of items.
clear
public final void clear()
- Removes all items from this list.
All Packages Class Hierarchy This Package Previous Next Index