parameter
Class Parameter

java.lang.Object
  extended bymotris.data.Description
      extended byparameter.Parameter
Direct Known Subclasses:
FreeParameter, NonFreeParameter

public class Parameter
extends Description

A general-purpose Algorithm parameter specified by a id, name, type, unit and value. Its main purpose is a convenience class to make parameter handling as easy as possible for the programmer to avoid parameters hidden inside the program.

Author:
ottlik, dahlkamp

Field Summary
static java.lang.String BOOLEAN
           
private  boolean booleanValue
           
static java.lang.String COLOR
           
private  java.awt.Color colorValue
           
static java.lang.String DIRSELECTION
           
static java.lang.String DOUBLE
           
static java.lang.String DOUBLEMATRIX
           
private  DoubleMatrix doubleMatrixValue
           
private  double doubleValue
           
static java.lang.String FILESELECTION
           
static java.lang.String FREEPARAMETER
           
static java.lang.String INTEGER
           
private  int intValue
           
static java.lang.String SELECTION
           
static java.lang.String STRING
           
private  java.lang.String stringValue
           
private  java.lang.String type
           
private  java.lang.String unit
           
 
Fields inherited from class motris.data.Description
 
Constructor Summary
Parameter(java.lang.String _ident, java.lang.String _name, java.lang.String _unit, boolean _b)
           
Parameter(java.lang.String _ident, java.lang.String _name, java.lang.String _unit, java.awt.Color _c)
           
Parameter(java.lang.String _ident, java.lang.String _name, java.lang.String _unit, double _d)
           
Parameter(java.lang.String _ident, java.lang.String _name, java.lang.String _unit, DoubleMatrix _m)
           
Parameter(java.lang.String _ident, java.lang.String _name, java.lang.String _unit, int _i)
           
Parameter(java.lang.String _ident, java.lang.String _name, java.lang.String _unit, java.lang.String _s)
           
Parameter(java.lang.String _ident, java.lang.String _name, java.lang.String _s, java.lang.String _unit, java.lang.String _type)
           
 
Method Summary
 Parameter copy()
           
 boolean copyValueFrom(Parameter _param)
          Copies Value (no other information) from supplied Parameter into this one.
 boolean equals(java.lang.Object obj)
           
 boolean getBooleanValue()
           
 java.awt.Color getColorValue()
           
 DoubleMatrix getDoubleMatrixValue()
           
 double getDoubleValue()
           
 int getIntValue()
           
 java.lang.String getStringValue()
          Get the content of the stringValue property.
 java.lang.String getType()
           
 java.lang.String getUnit()
           
 java.lang.String getValueString()
          Returns a string representation of the value.
 boolean isBooleanType()
           
 boolean isColorType()
           
 boolean isCompatibleWith(Parameter _param)
          Returns true if the supplied Parameter has got same type,ident and unit but possibly a different value than this one.
 boolean isDirSelectionType()
           
 boolean isDoubleMatrixType()
           
 boolean isDoubleType()
           
 boolean isFileSelectionType()
           
 boolean isFreeParameterType()
           
 boolean isIntType()
           
 boolean isRadianAngleUnit()
           
 boolean isSelectionType()
           
 boolean isStringType()
           
 void setBooleanValue(boolean b)
           
 void setBooleanValue(java.lang.String s)
           
 void setColorValue(java.awt.Color _c)
           
 void setColorValue(java.lang.String s)
           
 void setDoubleMatrixValue(DoubleMatrix _m)
           
 void setDoubleMatrixValue(java.lang.String s)
           
 void setDoubleValue(double d)
           
 void setIntValue(int i)
           
 void setStringValue(java.lang.String string)
          Set the stringValue property to the string supplied.
 void setType(java.lang.String string)
           
 void setUnit(java.lang.String string)
           
 void setValue(java.lang.String string)
           
 java.lang.String toString()
           
 void toXML(java.lang.String linePrefix, java.lang.StringBuffer buffer)
           
 
Methods inherited from class motris.data.Description
getDescription, getIdentifier, getName, setDescription, setIdentifier, setName
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INTEGER

public static final java.lang.String INTEGER
See Also:
Constant Field Values

DOUBLE

public static final java.lang.String DOUBLE
See Also:
Constant Field Values

BOOLEAN

public static final java.lang.String BOOLEAN
See Also:
Constant Field Values

COLOR

public static final java.lang.String COLOR
See Also:
Constant Field Values

FREEPARAMETER

public static final java.lang.String FREEPARAMETER
See Also:
Constant Field Values

STRING

public static final java.lang.String STRING
See Also:
Constant Field Values

FILESELECTION

public static final java.lang.String FILESELECTION
See Also:
Constant Field Values

DIRSELECTION

public static final java.lang.String DIRSELECTION
See Also:
Constant Field Values

SELECTION

public static final java.lang.String SELECTION
See Also:
Constant Field Values

DOUBLEMATRIX

public static final java.lang.String DOUBLEMATRIX
See Also:
Constant Field Values

intValue

private int intValue

doubleValue

private double doubleValue

booleanValue

private boolean booleanValue

colorValue

private java.awt.Color colorValue

doubleMatrixValue

private DoubleMatrix doubleMatrixValue

stringValue

private java.lang.String stringValue

type

private java.lang.String type

unit

private java.lang.String unit
Constructor Detail

Parameter

public Parameter(java.lang.String _ident,
                 java.lang.String _name,
                 java.lang.String _unit,
                 int _i)

Parameter

public Parameter(java.lang.String _ident,
                 java.lang.String _name,
                 java.lang.String _unit,
                 double _d)

Parameter

public Parameter(java.lang.String _ident,
                 java.lang.String _name,
                 java.lang.String _unit,
                 boolean _b)

Parameter

public Parameter(java.lang.String _ident,
                 java.lang.String _name,
                 java.lang.String _unit,
                 java.awt.Color _c)

Parameter

public Parameter(java.lang.String _ident,
                 java.lang.String _name,
                 java.lang.String _unit,
                 DoubleMatrix _m)

Parameter

public Parameter(java.lang.String _ident,
                 java.lang.String _name,
                 java.lang.String _unit,
                 java.lang.String _s)

Parameter

public Parameter(java.lang.String _ident,
                 java.lang.String _name,
                 java.lang.String _s,
                 java.lang.String _unit,
                 java.lang.String _type)
Method Detail

toString

public java.lang.String toString()

toXML

public void toXML(java.lang.String linePrefix,
                  java.lang.StringBuffer buffer)

isCompatibleWith

public boolean isCompatibleWith(Parameter _param)
Returns true if the supplied Parameter has got same type,ident and unit but possibly a different value than this one.

Parameters:
_param -

copyValueFrom

public boolean copyValueFrom(Parameter _param)
Copies Value (no other information) from supplied Parameter into this one. returns false if Parameter Types don't match

Parameters:
_param -

setValue

public void setValue(java.lang.String string)
Parameters:
string -

getValueString

public java.lang.String getValueString()
Returns a string representation of the value. Do not confuse with getStringValue() !

Returns:
string representation

getColorValue

public java.awt.Color getColorValue()

getDoubleMatrixValue

public DoubleMatrix getDoubleMatrixValue()

getBooleanValue

public boolean getBooleanValue()

getDoubleValue

public double getDoubleValue()

getIntValue

public int getIntValue()

getStringValue

public java.lang.String getStringValue()
Get the content of the stringValue property. Do not confuse with getValueString() function with converts other properties.

Returns:
stringValue property

setColorValue

public void setColorValue(java.awt.Color _c)

setColorValue

public void setColorValue(java.lang.String s)

setDoubleMatrixValue

public void setDoubleMatrixValue(DoubleMatrix _m)

setDoubleMatrixValue

public void setDoubleMatrixValue(java.lang.String s)

setBooleanValue

public void setBooleanValue(boolean b)
Parameters:
b -

setBooleanValue

public void setBooleanValue(java.lang.String s)

setDoubleValue

public void setDoubleValue(double d)
Parameters:
d -

setIntValue

public void setIntValue(int i)
Parameters:
i -

setStringValue

public void setStringValue(java.lang.String string)
Set the stringValue property to the string supplied. Do not confuse with setValue()

Parameters:
string -

getType

public java.lang.String getType()

setType

public void setType(java.lang.String string)

isIntType

public boolean isIntType()

isDoubleType

public boolean isDoubleType()

isBooleanType

public boolean isBooleanType()

isColorType

public boolean isColorType()

isDoubleMatrixType

public boolean isDoubleMatrixType()

isStringType

public boolean isStringType()

isFileSelectionType

public boolean isFileSelectionType()

isFreeParameterType

public boolean isFreeParameterType()

isDirSelectionType

public boolean isDirSelectionType()

isSelectionType

public boolean isSelectionType()

copy

public Parameter copy()

getUnit

public java.lang.String getUnit()

setUnit

public void setUnit(java.lang.String string)

isRadianAngleUnit

public boolean isRadianAngleUnit()

equals

public boolean equals(java.lang.Object obj)