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

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
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable<ParamModel>
Direct Known Subclasses:
ParamDouble, ParamFloat, ParamInteger, ParamLong

public abstract class ParamNumber
extends ParamModel<java.lang.Number>

Number Parameter storage.

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
protected  java.lang.Number max
          The max.
static double MAX_DOUBLE_VALUE
          The Constant MAX_DOUBLE_VALUE.
static float MAX_FLOAT_VALUE
          The Constant MAX_FLOAT_VALUE.
static int MAX_INT_VALUE
          The Constant MAX_INT_VALUE.
static long MAX_LONG_VALUE
          The Constant MAX_LONG_VALUE.
protected  java.lang.Number min
          The min.
static double MIN_DOUBLE_VALUE
          The Constant MIN_DOUBLE_VALUE.
static float MIN_FLOAT_VALUE
          The Constant MIN_FLOAT_VALUE.
static int MIN_INT_VALUE
          The Constant MIN_INT_VALUE.
static long MIN_LONG_VALUE
          The Constant MIN_LONG_VALUE.
protected  java.lang.Number value
          The 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
ParamNumber()
           
 
Method Summary
abstract  ParamNumber clone()
          Clone parameter.
 boolean equals(ParamModel<java.lang.Number> model)
           
 double getDouble()
          Get the number value as double.
 float getFloat()
          Get the number value as float.
 int getInt()
          Get the number value as int.
 long getLong()
          Get the number value as long.
 java.lang.Number getMax()
          Get maximum possible value.
 java.lang.Number getMin()
          Get minimum possible value.
 java.lang.Number getValue()
          Get the number value.
 boolean isCompatible(PipePort model)
          Check compatiblity between parameters.
 java.lang.String probeDefaultValue()
           
 void setValue(java.lang.Number value)
          Set the parameter.
abstract  void setValue(java.lang.String str)
          Set the parameter.
 java.lang.String toString()
          Get description of parameter.
 
Methods inherited from class edu.jhu.ece.iacl.jist.pipeline.parameter.ParamModel
clean, compareTo, createMipavParameter, createTreeNode, dispose, getCliTag, getDescription, getFactory, getHumanReadableDataType, getInputView, getLabel, getName, getOutputView, getShortLabel, getView, getXMLValue, hide, importMipavParameter, importParameter, isConnectible, isHidden, isMandatory, loadResources, loadResources, read, read, replacePath, saveResources, setCliTag, setDescription, setFactory, setHidden, setInputView, setLabel, setLoadAndSaveOnValidate, setMandatory, setName, setOutputView, setShortLabel, setXMLValue, toXML, validate, 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, init, 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
 

Field Detail

MIN_DOUBLE_VALUE

public static final double MIN_DOUBLE_VALUE
The Constant MIN_DOUBLE_VALUE.

See Also:
Constant Field Values

MAX_DOUBLE_VALUE

public static final double MAX_DOUBLE_VALUE
The Constant MAX_DOUBLE_VALUE.

See Also:
Constant Field Values

MIN_FLOAT_VALUE

public static final float MIN_FLOAT_VALUE
The Constant MIN_FLOAT_VALUE.

See Also:
Constant Field Values

MAX_FLOAT_VALUE

public static final float MAX_FLOAT_VALUE
The Constant MAX_FLOAT_VALUE.

See Also:
Constant Field Values

MIN_INT_VALUE

public static final int MIN_INT_VALUE
The Constant MIN_INT_VALUE.

See Also:
Constant Field Values

MAX_INT_VALUE

public static final int MAX_INT_VALUE
The Constant MAX_INT_VALUE.

See Also:
Constant Field Values

MIN_LONG_VALUE

public static final long MIN_LONG_VALUE
The Constant MIN_LONG_VALUE.

See Also:
Constant Field Values

MAX_LONG_VALUE

public static final long MAX_LONG_VALUE
The Constant MAX_LONG_VALUE.

See Also:
Constant Field Values

value

protected java.lang.Number value
The value.


min

protected java.lang.Number min
The min.


max

protected java.lang.Number max
The max.

Constructor Detail

ParamNumber

public ParamNumber()
Method Detail

clone

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

Specified by:
clone in class ParamModel<java.lang.Number>
Returns:
the pipe port

getDouble

public double getDouble()
Get the number value as double.

Returns:
double value

getFloat

public float getFloat()
Get the number value as float.

Returns:
float value

getInt

public int getInt()
Get the number value as int.

Returns:
integer value

getLong

public long getLong()
Get the number value as long.

Returns:
long value

getMax

public java.lang.Number getMax()
Get maximum possible value.

Returns:
the max

getMin

public java.lang.Number getMin()
Get minimum possible value.

Returns:
the min

getValue

public java.lang.Number getValue()
Get the number value.

Specified by:
getValue in class ParamModel<java.lang.Number>
Returns:
number value

isCompatible

public boolean isCompatible(PipePort model)
Check compatiblity between parameters.

Overrides:
isCompatible in class ParamModel<java.lang.Number>
Parameters:
model - the model
Returns:
true, if checks if is compatible

setValue

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

Specified by:
setValue in class ParamModel<java.lang.Number>
Parameters:
value - number value

setValue

public abstract void setValue(java.lang.String str)
Set the parameter. The value can be a String

Parameters:
str - the str

toString

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

Specified by:
toString in class ParamModel<java.lang.Number>
Returns:
the string

equals

public boolean equals(ParamModel<java.lang.Number> model)
Overrides:
equals in class ParamModel<java.lang.Number>

probeDefaultValue

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