Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.mdm.index.survivor
Class StrategyParameter

    java.lang.Object
      com.sun.mdm.index.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

Field Summary
`protected java.lang.String` | `mName` The name of the parameter
`protected java.lang.String` | `mType` The type of parameter
`protected java.lang.String` | `mValue` The value of the parameter

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.
`(package private) static java.lang.Object` | `getObjectFromString(java.lang.String string, java.lang.Class type)` return the value object, after conversion from string to specified type
`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`

Field Detail

### mName

    protected java.lang.String mName

  The name of the parameter

### mType

    protected java.lang.String mType

  The type of parameter

### mValue

    protected java.lang.String mValue

  The value of the parameter

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.

### getObjectFromString

    static java.lang.Object getObjectFromString(java.lang.String string,
                                                java.lang.Class type)

  return the value object, after conversion from string to specified type

  Parameters:
    `string` - value as a string
    `type` - type to convert to
  Returns:
    value object

### 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.

Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Sun Microsystems, Inc.