All Packages Class Hierarchy This Package Previous Next Index
Class spec.harness.SpecProps
spec.harness.SpecProps
- public class SpecProps
This class is used to maintain the SpecJVMClient properties. User can
edit these properties. These properties are part of the results sent in
the e-mail format. These properties are used in processing the results.
-
SpecProps(String)
- Creates a new SPEC properties object, initialized with properties read from
a file or URL "props/spec".
-
SpecProps(String, Color)
- Creates a new SPEC properties object as above
-
SpecProps(String, String, String, String, Color)
- Creates a new SPEC properties object, initialized with properties and titles
read from files as above.
-
get(String)
- Get the property value associated with the key.
-
get(String, String)
- Get the property value associated with the key,
or if there is none then return the supplied default value
-
getBoolean(String)
- Get the boolean property value associated with the key.
-
getProperties()
- Get the java.util.Properties (all of them)
-
getTitle(String)
- Get the title property value associated with the key.
-
isSetup()
- Checks whether the user did the setup atleast once.
-
list(PrintStream)
- Lists all the properties to the output stream provided
-
parametersChosen()
-
-
put(String, String)
-
Adds the Key and Hash to the Properties object
-
setup()
-
Shows the Setup dialog.
-
toString()
- Overriden toString() method
SpecProps
public SpecProps(String baseDir)
- Creates a new SPEC properties object, initialized with properties read from
a file or URL "props/spec". The titles of those properties are given in "props/title".
Those files are specified relative to a base directory which is typically the
benchmark installation directory. The user is given an opportunity to override
the default location of those files through a dialog box.
- Parameters:
- baseDir - base directory / URL prefix
SpecProps
public SpecProps(String baseDir,
Color setupColor)
- Creates a new SPEC properties object as above
- Parameters:
- baseDir - base directory / URL prefix
- setupColor - background color of the setup screen
SpecProps
public SpecProps(String baseDir,
String specFileName,
String userFileName,
String titleFileName,
Color setupColor)
- Creates a new SPEC properties object, initialized with properties and titles
read from files as above.
- Parameters:
- baseDir - base directory / URL prefix
- specFileName - Default name of file with inital properties specified by SPEC. Path name is relative to baseDir
- userFileName - full URL of file with inital properties specified by user
- titleFileName - Default name of file with property titles. Path name is relative to baseDir
get
public String get(String key)
- Get the property value associated with the key.
- Parameters:
- key - key value
- Returns:
- property value (may be null if property does not exist)
Note that both key and value are Strings, not general Objects
- See Also:
- get
get
public String get(String key,
String def)
- Get the property value associated with the key,
or if there is none then return the supplied default value
- Parameters:
- key - key value
- def - default value
- Returns:
- property value or def if property does not exist
getBoolean
public boolean getBoolean(String key)
- Get the boolean property value associated with the key.
- Parameters:
- key - key value
- Returns:
- property value (false if property does not exist)
Note that key is a Strings, not general Objects
getProperties
public Properties getProperties()
- Get the java.util.Properties (all of them)
- Returns:
- properties
getTitle
public String getTitle(String key)
- Get the title property value associated with the key.
- Parameters:
- key - key value
- Returns:
- property value (may be null if property does not exist)
Note that both key and value are Strings, not general Objects
- See Also:
- get
isSetup
public boolean isSetup()
- Checks whether the user did the setup atleast once. The report can't be
generated before doing the setup atleast once. User can alter the properties
of the JVM client, Hardware, e-mail address to send the report during the
Setup process.
list
public void list(PrintStream out)
- Lists all the properties to the output stream provided
- Parameters:
- out - Outputput stream.
parametersChosen
public boolean parametersChosen()
put
public void put(String key,
String value)
- Adds the Key and Hash to the Properties object
- Parameters:
- key - Key
- value - value of the key
setup
public void setup()
- Shows the Setup dialog. User can edit the properties.
toString
public String toString()
- Overriden toString() method
All Packages Class Hierarchy This Package Previous Next Index