org.keridwen.modelling.global.parameters
Class GlobalParameter

java.lang.Object
  extended by org.keridwen.modelling.global.parameters.GlobalParameter

public class GlobalParameter
extends Object

Generic setting parameter class

Author:
J.Forest, Artenum SARL.

Nested Class Summary
static class GlobalParameter.VerbosityLevel
           
 
Field Summary
static String BOOLEAN
           
static String DOUBLE
           
static String FLOAT
           
static String INT
           
static String OBJECT
           
static String STRING
           
 
Constructor Summary
GlobalParameter()
          Default construtor.
GlobalParameter(String keyName, String category, boolean value, String unit, String description)
          Constructor for boolean based value.
GlobalParameter(String keyName, String category, double value, String unit, String description)
          Constructor for double based value.
GlobalParameter(String keyName, String category, float value, String unit, String description)
          Constructor for float based value.
GlobalParameter(String keyName, String category, int value, String unit, String description)
          Constructor for int based value.
GlobalParameter(String keyName, String category, Object value, String unit, String description)
          Constructor for Object based value.
GlobalParameter(String keyName, String category, String value, String unit, String description)
          Constructor for string based value.
 
Method Summary
 void addGlobalParameterListener(GlobalParameterListener l)
          Register a listener for groups related change state events
 boolean equals(Object obj)
           
 String getCategory()
          Get the category of the present parameter.
 String getDescription()
          Get the free description of the parameters.
 String getKeyName()
          Get the name of the present parameter.
 String getTypeAString()
          Get the type of the present parameter on the form of a simple String.
 String getUnit()
          Get the unit as String of the present parameter.
 Object getValue()
          Get the stored value.
 boolean getValueAsBoolean()
           
 double getValueAsDouble()
           
 float getValueAsFloat()
           
 int getValueAsInt()
           
 Object getValueAsObject()
           
 String getValueAsString()
           
 GlobalParameter.VerbosityLevel getVerbosityLevel()
           
 int hashCode()
           
 void removeGlobalParameterListener(GlobalParameterListener l)
          Remove a listener for groups related events
 void setCategory(String category)
          This field is optional, but can be useful to organised Parameters into several sub-categories (in the table based editor for instance).
 void setDescription(String description)
          Set the free description of the parameters.
 void setKeyName(String keyName)
          Set the name of the present parameter.
 void setTypeAString(String typeAString)
          Set the type of the present parameter on the form of a simple String.
 void setUnit(String unit)
          Set the unit as String of the present parameter.
 void setValueAsBoolean(boolean valueAsBoolean)
           
 void setValueAsDouble(double valueAsDouble)
           
 void setValueAsFloat(float valueAsFloat)
           
 void setValueAsInt(int valueAsInt)
           
 void setValueAsObject(Object valueAsObject)
           
 void setValueAsString(String valueAsString)
           
 void setVerbosityLevel(GlobalParameter.VerbosityLevel verbosityLevel)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

OBJECT

public static final String OBJECT
See Also:
Constant Field Values

FLOAT

public static final String FLOAT
See Also:
Constant Field Values

DOUBLE

public static final String DOUBLE
See Also:
Constant Field Values

INT

public static final String INT
See Also:
Constant Field Values

STRING

public static final String STRING
See Also:
Constant Field Values

BOOLEAN

public static final String BOOLEAN
See Also:
Constant Field Values
Constructor Detail

GlobalParameter

public GlobalParameter()
Default construtor.


GlobalParameter

public GlobalParameter(String keyName,
                       String category,
                       Object value,
                       String unit,
                       String description)
Constructor for Object based value.

Parameters:
keyName - - name of the parameter.
category - - Category of the parameter.
value - - Value as Object of the parameter.
unit - - Unit as String of the parameter.
description - - Description of the parameter.

GlobalParameter

public GlobalParameter(String keyName,
                       String category,
                       float value,
                       String unit,
                       String description)
Constructor for float based value.

Parameters:
keyName - - name of the parameter.
category - - Category of the parameter.
value - - Value as float of the parameter.
unit - - Unit as String of the parameter.
description - - Description of the parameter.

GlobalParameter

public GlobalParameter(String keyName,
                       String category,
                       int value,
                       String unit,
                       String description)
Constructor for int based value.

Parameters:
keyName - - name of the parameter.
category - - Category of the parameter.
value - - Value as int of the parameter.
unit - - Unit as String of the parameter.
description - - Description of the parameter.

GlobalParameter

public GlobalParameter(String keyName,
                       String category,
                       double value,
                       String unit,
                       String description)
Constructor for double based value.

Parameters:
keyName - - name of the parameter.
category - - Category of the parameter.
value - - Value as double of the parameter.
unit - - Unit as String of the parameter.
description - - Description of the parameter.

GlobalParameter

public GlobalParameter(String keyName,
                       String category,
                       String value,
                       String unit,
                       String description)
Constructor for string based value.

Parameters:
keyName - - name of the parameter.
category - - Category of the parameter.
value - - Value as String of the parameter.
unit - - Unit as String of the parameter.
description - - Description of the parameter.

GlobalParameter

public GlobalParameter(String keyName,
                       String category,
                       boolean value,
                       String unit,
                       String description)
Constructor for boolean based value.

Parameters:
keyName - - name of the parameter.
category - - Category of the parameter.
value - - Value as boolean of the parameter.
unit - - Unit as String of the parameter.
description - - Description of the parameter.
Method Detail

getValue

public Object getValue()
Get the stored value.

Returns:
the stored value.

getKeyName

public String getKeyName()
Get the name of the present parameter.

Returns:
- KeyName of the present parameter.

setKeyName

public void setKeyName(String keyName)
Set the name of the present parameter.

Parameters:
keyName - - KeyName of the present parameter.

getCategory

public String getCategory()
Get the category of the present parameter.

Returns:
Category as String (e.g. External Boundary Conditions)

setCategory

public void setCategory(String category)
This field is optional, but can be useful to organised Parameters into several sub-categories (in the table based editor for instance).

Parameters:
category - - Category as String (e.g. External Boundary Conditions)

getUnit

public String getUnit()
Get the unit as String of the present parameter.

Returns:
- Unit.

setUnit

public void setUnit(String unit)
Set the unit as String of the present parameter.

Parameters:
unit - - String based representation of the unit.

getDescription

public String getDescription()
Get the free description of the parameters.

Returns:
- Description.

setDescription

public void setDescription(String description)
Set the free description of the parameters. This is field is optional.

Parameters:
description -

getTypeAString

public String getTypeAString()
Get the type of the present parameter on the form of a simple String.

Returns:
type as String.

setTypeAString

public void setTypeAString(String typeAString)
Set the type of the present parameter on the form of a simple String.

Parameters:
typeAString -

getValueAsObject

public Object getValueAsObject()

setValueAsObject

public void setValueAsObject(Object valueAsObject)

getValueAsFloat

public float getValueAsFloat()

setValueAsFloat

public void setValueAsFloat(float valueAsFloat)

getValueAsDouble

public double getValueAsDouble()

setValueAsDouble

public void setValueAsDouble(double valueAsDouble)

getValueAsInt

public int getValueAsInt()

setValueAsInt

public void setValueAsInt(int valueAsInt)

getValueAsString

public String getValueAsString()

setValueAsString

public void setValueAsString(String valueAsString)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

setValueAsBoolean

public void setValueAsBoolean(boolean valueAsBoolean)

getValueAsBoolean

public boolean getValueAsBoolean()

getVerbosityLevel

public GlobalParameter.VerbosityLevel getVerbosityLevel()

setVerbosityLevel

public void setVerbosityLevel(GlobalParameter.VerbosityLevel verbosityLevel)

addGlobalParameterListener

public void addGlobalParameterListener(GlobalParameterListener l)
Register a listener for groups related change state events


removeGlobalParameterListener

public void removeGlobalParameterListener(GlobalParameterListener l)
Remove a listener for groups related events


toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012-2013 Artenum. All Rights Reserved.