org.naturalcli.parameters
Class OctalParamType

java.lang.Object
  extended by org.naturalcli.parameters.OctalParamType
All Implemented Interfaces:
IParameterType

public class OctalParamType
extends java.lang.Object
implements IParameterType

The class implements an octal number parameter type.

Author:
Ferran Busquets
See Also:
Byte.valueOf(String, int)

Constructor Summary
OctalParamType()
           
 
Method Summary
 java.lang.Object convertParameterValue(java.lang.String strRepresentation)
          Converts the string representing the parameter value to the corresponding type value.
 java.lang.String getParameterTypeName()
          Gets the parameter type name.
 boolean validateParameter(java.lang.String value)
          Checks if a parameter value is of this type of parameter.
 java.lang.String validationMessage(java.lang.String value)
          Checks if a parameter value is of this type of parameter and returns a detailed message if the validation fails.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OctalParamType

public OctalParamType()
Method Detail

getParameterTypeName

public java.lang.String getParameterTypeName()
Description copied from interface: IParameterType
Gets the parameter type name.

Specified by:
getParameterTypeName in interface IParameterType
Returns:
the name of the parameter type

validateParameter

public boolean validateParameter(java.lang.String value)
Description copied from interface: IParameterType
Checks if a parameter value is of this type of parameter.

Specified by:
validateParameter in interface IParameterType
Returns:
true if the validation it's right; false otherwise

validationMessage

public java.lang.String validationMessage(java.lang.String value)
Description copied from interface: IParameterType
Checks if a parameter value is of this type of parameter and returns a detailed message if the validation fails.

Specified by:
validationMessage in interface IParameterType
Returns:
null if the validation it's right; a detailed message if something it's wrong

convertParameterValue

public java.lang.Object convertParameterValue(java.lang.String strRepresentation)
Description copied from interface: IParameterType
Converts the string representing the parameter value to the corresponding type value.

Specified by:
convertParameterValue in interface IParameterType
Parameters:
strRepresentation - the string representation of the value
Returns:
real object value