goldengine.java
Class SymbolList

java.lang.Object
  |
  +--goldengine.java.SymbolList

public class SymbolList
extends java.lang.Object

-------------------------------------------------------------------------------------------
Source File: SymbolList.java
Author: Devin Cook, Matthew Hawkins
Description: A holding class for Symbols, with special methods needed that a Vector can not fulfil.
-------------------------------------------------------------------------------------------
Revision List

      Author          Version         Description
      ------          -------         -----------
      MPH             1.0             First Issue

-------------------------------------------------------------------------------------------
IMPORT: java.util
-------------------------------------------------------------------------------------------


Constructor Summary
SymbolList()
           
 
Method Summary
 int add(Symbol newItem)
          add This method adds a symbol to the end of the list.
 void clear()
          clear This method empties the list.
 int count()
          count This method will return the number of entries in the SymbolList.
 Symbol getMember(int index)
          getMember This method will return the Symbol at the specified index.
 Symbol getMember(java.lang.String name)
          getMember This method will return the Symbol that has an equivalent name in the list.
 void reDim(int newSize)
          reDim This is the equivalent of the ReDim method in VB.
 void setMember(int index, Symbol obj)
          setMember This method will set the element at the specified index to the Symbol passed in.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SymbolList

public SymbolList()
Method Detail

reDim

public void reDim(int newSize)
reDim This is the equivalent of the ReDim method in VB. It will resize the Vector to the new size passed in.
Parameters:
newSize - The new size required.

clear

public void clear()
clear This method empties the list.

count

public int count()
count This method will return the number of entries in the SymbolList.
Returns:
The current number of symbols.

getMember

public Symbol getMember(int index)
getMember This method will return the Symbol at the specified index. It will do this if and only if the index is not less than 0, and if the index is less than the current number of symbols.
Parameters:
index - The index of the Symbol wanted.
Returns:
The symbol at the specified index, or null if the index is invalid.

getMember

public Symbol getMember(java.lang.String name)
getMember This method will return the Symbol that has an equivalent name in the list.
Parameters:
name - The name of the Symbol wanted in the list.
Returns:
The Symbol with the same name of that passed in.

setMember

public void setMember(int index,
                      Symbol obj)
setMember This method will set the element at the specified index to the Symbol passed in. It will do this if and only if the index is not less than 0, and if the index is less than the current member count.
Parameters:
index - The index to set the Symbol to.
obj - The Symbol to place in the SymbolList.

add

public int add(Symbol newItem)
add This method adds a symbol to the end of the list.
Parameters:
newItem - The Symbol to add.
Returns:
The index in the list at which the symbol was added.