byucc.jhdl.base.list
Interface List

All Known Implementing Classes:
LinkedList, TreeList, VectorList

public interface List

This interface describes public methods available for manipulating lists. In addition, every list implements get(), and get(Iterator iterator), which return the current element of the list according to the type of the list and in the context of the current iterator. In this way, the returned object does not need a cast. Some methods have public access to void insert(), forcing the list to contain proper elements, but other lists are read-only to the public.

Author:
Eric Blake

Method Summary
 boolean atEnd()
          Checks if list traversal is at end.
 int elementCount()
          Returns element count of the list.
 void init()
          Initializes the list to the beginning, and returns an Iterator for traversal.
 boolean inList(java.lang.Object o)
          Returns true if the object is found in the list.
 void next()
          Advances the current pointer.
 void prev()
          Reverses the current pointer.
 

Method Detail

init

public void init()
Initializes the list to the beginning, and returns an Iterator for traversal.

Returns:
an Iterator for simultaneous traversal

atEnd

public boolean atEnd()
Checks if list traversal is at end.

Returns:
true if at end, false if not.

next

public void next()
Advances the current pointer.


prev

public void prev()
Reverses the current pointer.


elementCount

public int elementCount()
Returns element count of the list.

Returns:
number of elements in the list.

inList

public boolean inList(java.lang.Object o)
Returns true if the object is found in the list.

Returns:
true if the object is in the list


Copyright ? 2006 Brigham Young University, Configurable Computing Laboratory. All Rights Reserved.