cdx.scorebot.app.util
Class TestInfo

java.lang.Object
  extended by cdx.scorebot.app.util.TestInfo
All Implemented Interfaces:
java.io.Serializable

public class TestInfo
extends java.lang.Object
implements java.io.Serializable

Stores information about a particular test

Author:
David Underhill
See Also:
Serialized Form

Constructor Summary
TestInfo()
          Instantiates a TestInfo
 
Method Summary
 void addOption(OptionInfo oi)
          Adds an option to be tested.
 void addResult(ResultInfo ri)
          Adds a result to be tested.
 java.lang.String getDescription()
          gets the description of this test
 java.lang.String getName()
          gets the name of this test
 OptionInfo getOption(int index)
          Gets the specified option
 java.util.Vector<OptionInfo> getOptions()
          gets the options in this test
 ResultInfo getResult(int index)
          Gets the specified result
 java.util.Vector<ResultInfo> getResults()
          gets the results in this test
 Test getTestFactory()
          gets the test
 void removeOption(int index)
          Removes the option from this test
 boolean removeOption(OptionInfo oi)
          Removes the option from this test
 void removeResult(int index)
          Removes the result from this test
 boolean removeResult(ResultInfo ri)
          Removes the result from this test
 void setDescription(java.lang.String desc)
          sets the description of this test
 void setName(java.lang.String name)
          sets the name of this test
 void setTestFactory(Test test)
          sets the test
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestInfo

public TestInfo()
Instantiates a TestInfo

Method Detail

getTestFactory

public Test getTestFactory()
gets the test


setTestFactory

public void setTestFactory(Test test)
sets the test


getName

public java.lang.String getName()
gets the name of this test


setName

public void setName(java.lang.String name)
sets the name of this test


getDescription

public java.lang.String getDescription()
gets the description of this test


setDescription

public void setDescription(java.lang.String desc)
sets the description of this test


addOption

public void addOption(OptionInfo oi)
Adds an option to be tested.

Parameters:
oi - the option to add to this test

removeOption

public void removeOption(int index)
                  throws java.lang.ArrayIndexOutOfBoundsException
Removes the option from this test

Parameters:
index - remove the option at the specified index.
Throws:
java.lang.ArrayIndexOutOfBoundsException - if the index was invalid.

removeOption

public boolean removeOption(OptionInfo oi)
Removes the option from this test

Parameters:
oi - the OptionInfo to remove
Returns:
false if the specified item wasn't in the list and true otherwise

getOption

public OptionInfo getOption(int index)
                     throws java.lang.ArrayIndexOutOfBoundsException
Gets the specified option

Returns:
the TestItem at the specified index in the TestItem vector
Throws:
java.lang.ArrayIndexOutOfBoundsException - if the index was invalid.

getOptions

public java.util.Vector<OptionInfo> getOptions()
gets the options in this test


addResult

public void addResult(ResultInfo ri)
Adds a result to be tested.

Parameters:
ri - the result to add to this test

removeResult

public void removeResult(int index)
                  throws java.lang.ArrayIndexOutOfBoundsException
Removes the result from this test

Parameters:
index - remove the result at the specified index.
Throws:
java.lang.ArrayIndexOutOfBoundsException - if the index was invalid.

removeResult

public boolean removeResult(ResultInfo ri)
Removes the result from this test

Parameters:
ri - the ResultInfo to remove
Returns:
false if the specified item wasn't in the list and true otherwise

getResult

public ResultInfo getResult(int index)
                     throws java.lang.ArrayIndexOutOfBoundsException
Gets the specified result

Returns:
the TestItem at the specified index in the TestItem vector
Throws:
java.lang.ArrayIndexOutOfBoundsException - if the index was invalid.

getResults

public java.util.Vector<ResultInfo> getResults()
gets the results in this test