chtdecoder.datastructures
Interface CHTCodeList

All Known Implementing Classes:
AbstractCHTCodeList

public interface CHTCodeList

A List for storing CHTCode objects.

Version:
1.1, 09/14/04
Author:
John David Ratliff

Method Summary
 void add(CHTCode code)
          Adds a CHTCode to the end of this list.
 CHTCode get(int index)
          Gets a CHTCode from this list.
 boolean isEmpty()
          Queries if this list is empty.
 CHTCodeIterator iterator()
          Gets an iterator for the elements in this list.
 CHTCode remove(int index)
          Removes a CHTCode from this list at position index.
 int size()
          Gets the size of this list (the element count).
 

Method Detail

add

public void add(CHTCode code)
Adds a CHTCode to the end of this list.

Parameters:
code - the CHTCode to add.

remove

public CHTCode remove(int index)
               throws java.lang.ArrayIndexOutOfBoundsException
Removes a CHTCode from this list at position index.

Parameters:
index - The position in the list to remove.
Returns:
The removed CHTCode object.
Throws:
java.lang.ArrayIndexOutOfBoundsException - if the index in not valid (0 < index < size())

get

public CHTCode get(int index)
            throws java.lang.ArrayIndexOutOfBoundsException
Gets a CHTCode from this list.

Parameters:
index - The index of the CHTCode to get.
Returns:
The CHTCode.
Throws:
java.lang.ArrayIndexOutOfBoundsException - if the index in not valid (0 < index < size())

size

public int size()
Gets the size of this list (the element count).

Returns:
The number of elements in this list.

isEmpty

public boolean isEmpty()
Queries if this list is empty.

Returns:
true if this list is empty; false otherwise.

iterator

public CHTCodeIterator iterator()
Gets an iterator for the elements in this list.

Returns:
The CHTCodeIterator.