databionics.modules
Class IntParameter

java.lang.Object
  extended by databionics.modules.Parameter
      extended by databionics.modules.IntParameter

public class IntParameter
extends Parameter

Parameter with integer number argument.


Field Summary
protected  java.lang.Integer def
          default value
protected static org.apache.log4j.Logger log
          log4j logging
protected  java.lang.Integer max
          maximum value
protected  java.lang.Integer min
          minimum value
protected  java.lang.Integer value
          parameter value
 
Fields inherited from class databionics.modules.Parameter
constant, description, longName, name, optional
 
Constructor Summary
IntParameter()
           
 
Method Summary
 java.lang.Object clone()
          Creates and returns a copy of this object.
 java.lang.Integer getDefault()
          Get the default value
 java.lang.Integer getMax()
          Get the maximum value
 java.lang.Integer getMin()
          Get the minimum value
 java.lang.Integer getValue()
          Get the value or, if value is not defined, the default value
 java.lang.String getValueAsString()
          String representation of value.
 void setDefault(int var)
          Set the default value
 void setDefault(java.lang.Integer var)
          Set the default value
 void setMax(int i)
          Set the maximum value
 void setMax(java.lang.Integer i)
          Set the maximum value
 void setMin(int i)
          Set the minimum value
 void setMin(java.lang.Integer i)
          Set the minimum value
 void setValue(int var)
          Set the value.
 void setValue(java.lang.Integer var)
          Set the value.
 void setValue(java.lang.String var)
          Set the value as a string.
 java.lang.String toString()
          String representation with name and value as needed for starting a tool.
 java.lang.String toXml()
          XML representation
static IntParameter valueOf(org.w3c.dom.Element el)
          Create a IntParameter from an XML tag
 
Methods inherited from class databionics.modules.Parameter
getDescription, getLongName, getName, isConstant, isOptional, setConstant, setDescription, setLongName, setName, setOptional
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

protected static org.apache.log4j.Logger log
log4j logging


def

protected java.lang.Integer def
default value


value

protected java.lang.Integer value
parameter value


min

protected java.lang.Integer min
minimum value


max

protected java.lang.Integer max
maximum value

Constructor Detail

IntParameter

public IntParameter()
Method Detail

getValue

public java.lang.Integer getValue()
Get the value or, if value is not defined, the default value


getValueAsString

public java.lang.String getValueAsString()
String representation of value.

Specified by:
getValueAsString in class Parameter

setValue

public void setValue(int var)
              throws LessThanMinException,
                     GreaterThanMaxException
Set the value. If var is less than the minimum, set the minimum instead and throw LessThanMinException to issue a warning. If var is greater than the maximum, set the maximum instead and throw GreaterThanMaxException to issue a warning.

Parameters:
var - new value
Throws:
LessThanMinException
GreaterThanMaxException

setValue

public void setValue(java.lang.Integer var)
              throws LessThanMinException,
                     GreaterThanMaxException
Set the value. If var is less than the minimum, set the minimum instead and throw LessThanMinException to issue a warning. If var is greater than the maximum, set the maximum instead and throw GreaterThanMaxException to issue a warning.

Parameters:
var - new value
Throws:
LessThanMinException
GreaterThanMaxException

setValue

public void setValue(java.lang.String var)
              throws java.lang.NumberFormatException,
                     LessThanMinException,
                     GreaterThanMaxException
Set the value as a string. If var is less than the minimum, set the minimum instead and throw LessThanMinException to issue a warning. If var is greater than the maximum, set the maximum instead and throw GreaterThanMaxException to issue a warning.

Parameters:
var - new value
Throws:
java.lang.NumberFormatException
LessThanMinException
GreaterThanMaxException

getDefault

public java.lang.Integer getDefault()
Get the default value


getMin

public java.lang.Integer getMin()
Get the minimum value


getMax

public java.lang.Integer getMax()
Get the maximum value


setDefault

public void setDefault(int var)
Set the default value


setDefault

public void setDefault(java.lang.Integer var)
Set the default value


setMin

public void setMin(int i)
Set the minimum value


setMin

public void setMin(java.lang.Integer i)
Set the minimum value


setMax

public void setMax(int i)
Set the maximum value


setMax

public void setMax(java.lang.Integer i)
Set the maximum value


clone

public java.lang.Object clone()
Creates and returns a copy of this object.

Specified by:
clone in class Parameter

toString

public java.lang.String toString()
String representation with name and value as needed for starting a tool.

Specified by:
toString in class Parameter

valueOf

public static IntParameter valueOf(org.w3c.dom.Element el)
Create a IntParameter from an XML tag


toXml

public java.lang.String toXml()
XML representation

Specified by:
toXml in class Parameter


Copyright © 2005-2006 Databionics Research Group. All Rights Reserved.