edu.jhu.ece.iacl.jist.pipeline.parameter
Class ParamDouble

java.lang.Object
  extended by edu.jhu.ece.iacl.jist.pipeline.PipePort<T>
      extended by edu.jhu.ece.iacl.jist.pipeline.parameter.ParamModel<java.lang.Number>
          extended by edu.jhu.ece.iacl.jist.pipeline.parameter.ParamNumber
              extended by edu.jhu.ece.iacl.jist.pipeline.parameter.ParamDouble
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable<ParamModel>

public class ParamDouble
extends ParamNumber

Double Parameter.

Author:
Blake Lucas

Nested Class Summary
 
Nested classes/interfaces inherited from class edu.jhu.ece.iacl.jist.pipeline.PipePort
PipePort.PortListener, PipePort.type
 
Field Summary
 
Fields inherited from class edu.jhu.ece.iacl.jist.pipeline.parameter.ParamNumber
max, MAX_DOUBLE_VALUE, MAX_FLOAT_VALUE, MAX_INT_VALUE, MAX_LONG_VALUE, min, MIN_DOUBLE_VALUE, MIN_FLOAT_VALUE, MIN_INT_VALUE, MIN_LONG_VALUE, value
 
Fields inherited from class edu.jhu.ece.iacl.jist.pipeline.parameter.ParamModel
cliTag, description, factory, hidden, label, loadAndSaveOnValidate, mandatory, shortLabel
 
Fields inherited from class edu.jhu.ece.iacl.jist.pipeline.PipePort
connectible, gport, incomingConnectors, listeners, maxIncoming, maxOutgoing, outgoingConnectors, owner, portType, useWire
 
Constructor Summary
ParamDouble()
          Construct double parameter with no restrictions on value.
ParamDouble(double min, double max)
          Construct double parameter with restrictions on min and max value.
ParamDouble(java.lang.String name)
          Construct double parameter with no restrictions on value.
ParamDouble(java.lang.String name, double val)
          Construct double parameter with restrictions on min and max value.
ParamDouble(java.lang.String name, double min, double max)
          Construct double parameter with restrictions on min and max value.
ParamDouble(java.lang.String name, double min, double max, double val)
          Construct double parameter with restrictions on min and max value.
 
Method Summary
 ParamDouble clone()
          Clone parameter.
 int compareTo(ParamModel model)
          Compare the min and max value restrictions of two parameters.
 java.lang.String getHumanReadableDataType()
           
 java.lang.String getXMLValue()
           
 void init()
          Initialize this object.
 void setValue(java.lang.Number value)
          Set the parameter.
 void setValue(java.lang.String str)
          Set value from string.
 void setXMLValue(java.lang.String arg)
           
 java.lang.String toString()
          Get description of parameter.
 void validate()
          Validate that the number is within the minimum and maximum restrictions.
 
Methods inherited from class edu.jhu.ece.iacl.jist.pipeline.parameter.ParamNumber
equals, getDouble, getFloat, getInt, getLong, getMax, getMin, getValue, isCompatible, probeDefaultValue
 
Methods inherited from class edu.jhu.ece.iacl.jist.pipeline.parameter.ParamModel
clean, createMipavParameter, createTreeNode, dispose, getCliTag, getDescription, getFactory, getInputView, getLabel, getName, getOutputView, getShortLabel, getView, hide, importMipavParameter, importParameter, isConnectible, isHidden, isMandatory, loadResources, loadResources, read, read, replacePath, saveResources, setCliTag, setDescription, setFactory, setHidden, setInputView, setLabel, setLoadAndSaveOnValidate, setMandatory, setName, setOutputView, setShortLabel, toXML, write, write, writeAndFreeNow
 
Methods inherited from class edu.jhu.ece.iacl.jist.pipeline.PipePort
addListener, disconnect, disconnect, disconnect, disconnect, getGraphPort, getIncomingConnector, getIncomingConnectors, getIncomingPorts, getListeners, getMaxIncoming, getMaxOutgoing, getOutgoingConnector, getOutgoingConnectors, getOutgoingPorts, getOwner, getPortType, isConnected, isConnectedTo, isInputPort, isOutputPort, notifyListenersOfConnection, notifyListenersOfDisconnection, removeAllListeners, removeListener, setConnectable, setGraphPort, setMaxIncoming, setMaxOutgoing, setOwner, setPortType, setUseConnector, usingConnector
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ParamDouble

public ParamDouble()
Construct double parameter with no restrictions on value.


ParamDouble

public ParamDouble(double min,
                   double max)
Construct double parameter with restrictions on min and max value.

Parameters:
min - minimum value restriction
max - maximum value restriction

ParamDouble

public ParamDouble(java.lang.String name)
Construct double parameter with no restrictions on value.

Parameters:
name - parameter name

ParamDouble

public ParamDouble(java.lang.String name,
                   double val)
Construct double parameter with restrictions on min and max value.

Parameters:
name - parameter name
val - value

ParamDouble

public ParamDouble(java.lang.String name,
                   double min,
                   double max)
Construct double parameter with restrictions on min and max value.

Parameters:
name - parameter name
min - minimum value restriction
max - maximum value restriction

ParamDouble

public ParamDouble(java.lang.String name,
                   double min,
                   double max,
                   double val)
Construct double parameter with restrictions on min and max value.

Parameters:
name - parameter name
min - minimum value restriction
max - maximum value restriction
val - the val
Method Detail

clone

public ParamDouble clone()
Description copied from class: PipePort
Clone parameter.

Specified by:
clone in class ParamNumber
Returns:
the pipe port

compareTo

public int compareTo(ParamModel model)
Compare the min and max value restrictions of two parameters.

Specified by:
compareTo in interface java.lang.Comparable<ParamModel>
Overrides:
compareTo in class ParamModel<java.lang.Number>
Parameters:
model - the model
Returns:
the int

init

public void init()
Initialize this object.

Specified by:
init in class PipePort<java.lang.Number>

setValue

public void setValue(java.lang.String str)
Set value from string.

Specified by:
setValue in class ParamNumber
Parameters:
str - the str

toString

public java.lang.String toString()
Description copied from class: ParamModel
Get description of parameter.

Overrides:
toString in class ParamNumber
Returns:
the string

validate

public void validate()
              throws InvalidParameterException
Validate that the number is within the minimum and maximum restrictions.

Specified by:
validate in class ParamModel<java.lang.Number>
Throws:
InvalidParameterException - parameter does not meet value restrictions

getHumanReadableDataType

public java.lang.String getHumanReadableDataType()
Specified by:
getHumanReadableDataType in class ParamModel<java.lang.Number>

getXMLValue

public java.lang.String getXMLValue()
Specified by:
getXMLValue in class ParamModel<java.lang.Number>

setXMLValue

public void setXMLValue(java.lang.String arg)
Specified by:
setXMLValue in class ParamModel<java.lang.Number>

setValue

public void setValue(java.lang.Number value)
Description copied from class: ParamNumber
Set the parameter. The value must be of Number type. Now institutes type-safe censoring (clamping).(12/2008 bl)

Overrides:
setValue in class ParamNumber
Parameters:
value - number value