com.mccrory.scott.spumoni
Class StatsProgram

java.lang.Object
  |
  +--com.mccrory.scott.spumoni.StatsProgram

public class StatsProgram
extends java.lang.Object

StatsProgram is a data object for the statistics programs handled by Spumoni through the StatsCollector class. It also contains attributes such as the program name, regexp, a list of required modules, max run time and a Vector of StatsValue objects.

Version:
CVS $Id: StatsProgram.java,v 1.8 2002/08/04 22:04:53 smccrory Exp $
Author:
Scott McCrory.

Constructor Summary
StatsProgram()
          Basic StatsProgram constructor.
StatsProgram(java.lang.String newXmlFilename, java.lang.String newProgram, java.lang.String newRegexp, java.util.Vector newRequiredModules, int newMaxRunTime, StatsValueList newStatsValueList)
          A convenience StatsProgram contructor to set all of the data elements at the time of creation.
 
Method Summary
 void addStatsValue(StatsValue sv)
          Adds the StatsValue object to our StatsValueList
 java.lang.Object clone()
          We override the clone method here to prevent cloning of our class.
 int getMaxRunTime()
          Returns the program's maximum run time in seconds.
 java.util.Vector getOids()
          Returns a vector of all of the OIDs in this StatsProgram
 java.lang.String getProgram()
          Returns the program's command string.
 java.lang.String getRegexp()
          Returns the program's regexp string.
 java.util.Vector getRequiredModules()
          Returns a Vector of the program's required modules.
 StatsValueList getStatsValueList()
          Returns a StatsValueList of the program's StatsValue objects.
 java.lang.String getXmlFilename()
          Returns the program's source XML filename.
 void setMaxRunTime(int newMaxRunTime)
          Sets the program's maximum run time in seconds.
 void setProgram(java.lang.String newProgram)
          Sets the program's command string.
 void setRegexp(java.lang.String newRegexp)
          Sets the program's regular expression string.
 void setRequiredModules(java.lang.String newRequiredModules)
          Sets the program's Vector of required modules from a comma-delimited string.
 void setRequiredModules(java.util.Vector newRequiredModules)
          Sets the program's Vector of required modules.
 void setStatsValues(StatsValueList newStatsValueList)
          Sets the program's Vector of StatsValue objects.
 void setXmlFilename(java.lang.String newXmlFilename)
          Sets the program's source XML filename.
 java.lang.String toString()
          Returns a formatted String of this object's values
 void unsetStatsValues()
          Unsets the values in all of the attached StatsValue objects.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StatsProgram

public StatsProgram()
Basic StatsProgram constructor.


StatsProgram

public StatsProgram(java.lang.String newXmlFilename,
                    java.lang.String newProgram,
                    java.lang.String newRegexp,
                    java.util.Vector newRequiredModules,
                    int newMaxRunTime,
                    StatsValueList newStatsValueList)
A convenience StatsProgram contructor to set all of the data elements at the time of creation.

Parameters:
newXmlFilename - The program's source XML filename
newProgram - The program's command string
newRegexp - Regexp string
newRequiredModules - List of required modules
newMaxRunTime - Maximum run time
newStatsValueList - List of stats values
Method Detail

addStatsValue

public void addStatsValue(StatsValue sv)
Adds the StatsValue object to our StatsValueList

Parameters:
sv - com.mccrory.scott.spumoni.StatsValue

clone

public final java.lang.Object clone()
                             throws java.lang.CloneNotSupportedException
We override the clone method here to prevent cloning of our class.

Overrides:
clone in class java.lang.Object
Returns:
Nothing ever really returned since we throw a CloneNotSupportedException
Throws:
java.lang.CloneNotSupportedException - To indicate cloning is not allowed

getMaxRunTime

public int getMaxRunTime()
Returns the program's maximum run time in seconds.

Returns:
int

getProgram

public java.lang.String getProgram()
Returns the program's command string.

Returns:
java.lang.String

getRegexp

public java.lang.String getRegexp()
Returns the program's regexp string.

Returns:
java.lang.String

getRequiredModules

public java.util.Vector getRequiredModules()
Returns a Vector of the program's required modules.

Returns:
java.util.Vector

getStatsValueList

public StatsValueList getStatsValueList()
Returns a StatsValueList of the program's StatsValue objects.

Returns:
StatsValueList

getOids

public java.util.Vector getOids()
Returns a vector of all of the OIDs in this StatsProgram

Returns:
A vector of all of the OIDs in this StatsProgram

getXmlFilename

public java.lang.String getXmlFilename()
Returns the program's source XML filename. (i.e. where we learned about it).

Returns:
java.lang.String

setMaxRunTime

public void setMaxRunTime(int newMaxRunTime)
Sets the program's maximum run time in seconds.

Parameters:
newMaxRunTime - int

setProgram

public void setProgram(java.lang.String newProgram)
Sets the program's command string.

Parameters:
newProgram - java.lang.String

setRegexp

public void setRegexp(java.lang.String newRegexp)
Sets the program's regular expression string.

Parameters:
newRegexp - java.lang.String

setRequiredModules

public void setRequiredModules(java.lang.String newRequiredModules)
Sets the program's Vector of required modules from a comma-delimited string.

Parameters:
newRequiredModules - java.util.Vector

setRequiredModules

public void setRequiredModules(java.util.Vector newRequiredModules)
Sets the program's Vector of required modules.

Parameters:
newRequiredModules - java.util.Vector

setStatsValues

public void setStatsValues(StatsValueList newStatsValueList)
Sets the program's Vector of StatsValue objects.

Parameters:
newStatsValueList - The new StatsValueList we're storing

setXmlFilename

public void setXmlFilename(java.lang.String newXmlFilename)
Sets the program's source XML filename. (i.e. where we learned about it).

Parameters:
newXmlFilename - The XML filename which defines this object

toString

public java.lang.String toString()
Returns a formatted String of this object's values

Overrides:
toString in class java.lang.Object
Returns:
java.lang.String

unsetStatsValues

public void unsetStatsValues()
Unsets the values in all of the attached StatsValue objects. Creation date: (1/22/2002 8:55:26 PM)



Copyright © 2002 Scott McCrory as part of the Spumoni project. All Rights Reserved.