org.cesta.types
Class Parameter

java.lang.Object
  extended by org.cesta.types.Parameter

public final class Parameter
extends java.lang.Object

Type Parameter is composed of a name and a value.

Author:
Tobias Smolka

Constructor Summary
Parameter()
           
 
Method Summary
protected static java.lang.Boolean getBooleanValue(java.lang.String value)
          Returns boolean value if value equals yes, true, on or 1 and false if value equals no, false, off or 0.
 java.lang.String getName()
          Get the name attribute.
protected static java.lang.Number getNumberValue(java.lang.String value)
          Returns numberic value if value has numeric format (Integer or Double).
 java.lang.Object getValue()
          Get the value attribute.
 void setName(java.lang.String name)
          Set the name attribute.
 void setValue(java.lang.String value)
          Set the value attribute.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Parameter

public Parameter()
Method Detail

setName

public void setName(java.lang.String name)
Set the name attribute.

Parameters:
name - a String value

getBooleanValue

protected static java.lang.Boolean getBooleanValue(java.lang.String value)
Returns boolean value if value equals yes, true, on or 1 and false if value equals no, false, off or 0. Otherwise null is returned.

Parameters:
value - value
Returns:
boolean or null

getNumberValue

protected static java.lang.Number getNumberValue(java.lang.String value)
Returns numberic value if value has numeric format (Integer or Double).

Parameters:
value - value
Returns:
Integer, Double or null

setValue

public void setValue(java.lang.String value)
Set the value attribute. If the value has boolean form (i.e. true,yes,on,1,false,no,off) it will be converted to Boolean object. In case it has numeric form, it weill be converted to Integer or Double.

Parameters:
value - a String value

getName

public java.lang.String getName()
Get the name attribute.

Returns:
a String value

getValue

public java.lang.Object getValue()
Get the value attribute.

Returns:
a Object value