com.stc.eindex.survivor
Class StrategyParameter

java.lang.Object
  extended bycom.stc.eindex.survivor.StrategyParameter
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class StrategyParameter
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

The StrategyParameter class represents a single parameter for the survivor strategy. These parameters are specified in the Best Record configuration file. This class converts text values into actual Java objects.

See Also:
Serialized Form

Constructor Summary
StrategyParameter(java.lang.String name, java.lang.String type, java.lang.String value)
          Creates a new instance of the StrategyParameter class given the name, type, and value of the parameter.
 
Method Summary
(package private)  void checkType(java.lang.String type)
          Verifies the specified parameter type to ensure that it is an allowed type and that it can be loaded using the current class loader.
 java.lang.String getName()
          Retrieves the parameter name from an instance of StrategyParameter.
 java.lang.String getType()
          Retrieves the string representation of the parameter type from an instance of StrategyParameter.
 java.lang.String getValue()
          Retrieves the original string representation of the parameter value from an instance of StrategyParameter.
 java.lang.Object getValueObject()
          Retrieves the parameter value after it is converted to the specified type.
 java.lang.Class getValueType()
          Retrieves the Java class representing the value type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StrategyParameter

public StrategyParameter(java.lang.String name,
                         java.lang.String type,
                         java.lang.String value)
Creates a new instance of the StrategyParameter class given the name, type, and value of the parameter.

Parameters:
name - The name of the parameter.
type - The type of parameter. This must match one of the following allowed types.
  • String
  • Boolean
  • Integer
  • Double
  • Byte
  • Short
  • Long
  • Float
  • Character
value - The value of the parameter.
Throws:
None.
Method Detail

checkType

void checkType(java.lang.String type)
Verifies the specified parameter type to ensure that it is an allowed type and that it can be loaded using the current class loader.

Parameters:
type - The parameter type.
Returns:
void - None.
Throws:
None.

getName

public java.lang.String getName()
Retrieves the parameter name from an instance of StrategyParameter.

Parameters:
None.

Returns:
String - The name of the strategy parameter.
Throws:
None.

getType

public java.lang.String getType()
Retrieves the string representation of the parameter type from an instance of StrategyParameter.

Parameters:
None.

Returns:
String - The strategy parameter type as a string.
Throws:
None.

getValue

public java.lang.String getValue()
Retrieves the original string representation of the parameter value from an instance of StrategyParameter.

Parameters:
None.

Returns:
String - The strategy parameter value.
Throws:
None.

getValueObject

public java.lang.Object getValueObject()
Retrieves the parameter value after it is converted to the specified type.

Parameters:
None.

Returns:
Object - The parameter value converted to an object.
Throws:
None.

getValueType

public java.lang.Class getValueType()
Retrieves the Java class representing the value type.

Parameters:
None.

Returns:
Class - The Java class of the value type.
Throws:
None.


Copyright 2007 by Sun Microsystems, Inc. All Rights Reserved.