Package org.graffiti.plugin.parameter
Class FloatParameter
java.lang.Object
org.graffiti.plugin.parameter.AbstractSingleParameter
org.graffiti.plugin.parameter.AbstractLimitableParameter
org.graffiti.plugin.parameter.FloatParameter
- All Implemented Interfaces:
Displayable,LimitableParameter,Parameter,SingleParameter
public class FloatParameter extends AbstractLimitableParameter
Parameter that can contain
Float/float values.- Version:
- 2.6.5
- Recent revisions:
- 2.6.5
-
Constructor Summary
Constructors Constructor Description FloatParameter(Float value, Float min, Float max, Float distance, String name, String description)Constructs a new Float parameter.FloatParameter(Float value, Float min, Float max, String name, String description)Constructs a new Float parameter.FloatParameter(Float value, Float distance, String name, String description)Constructs a new Float parameter.FloatParameter(Float value, String name, String description)Constructs a new Float parameter.FloatParameter(String name, String description)Constructs a new float parameter. -
Method Summary
Modifier and Type Method Description FloatgetFloat()Returns the value of this parameter as aFloat.Comparable<Float>getMax()Returns the max defined value of this Float parameter.Comparable<Float>getMin()Returns the min defined value of this Float parameter.ObjectgetValue()Returns the value of this parameter.NumbergetValuesBall()The closed ball diameter exclusive for the current parameter value, such that
v(t) = val
v(t+1) = (val +|- ballDiameter)
whereas t stands for time point.booleanisValid()Returnstrueif the value is between the minimum and the maximum,falseotherwise.voidsetMax(Float max)voidsetMin(Float min)voidsetValue(Object value)Sets the value of theAttributeParameter.voidsetValuesBallSize(Float ball)Set new intervalue distance.Methods inherited from class org.graffiti.plugin.parameter.AbstractLimitableParameter
toXMLStringMethods inherited from class org.graffiti.plugin.parameter.AbstractSingleParameter
getDescription, getIcon, getImage, getName, isLeftAligned, setDescription, setLeftAligned, toStringMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.graffiti.plugin.Displayable
getDescription, getIcon, getName, setDescription
-
Constructor Details
-
FloatParameter
Constructs a new float parameter.- Parameters:
name- the name of the parameter.description- the description of the parameter.
-
FloatParameter
Constructs a new Float parameter.- Parameters:
value- the new Float value. May be null.name- the name of the parameter.description- the description of the parameter.
-
FloatParameter
Constructs a new Float parameter.- Parameters:
value- the new Float value. May be null.min- the minimum value.max- the maximum value.name- the name of the parameter.description- the description of the parameter.
-
FloatParameter
public FloatParameter(Float value, Float min, Float max, Float distance, String name, String description)Constructs a new Float parameter.- Parameters:
value- the new Float value. May be null.min- the minimum value.max- the maximum value.distance- the distance between any two points in the [min, max] interval.name- the name of the parameter.description- the description of the parameter.
-
FloatParameter
Constructs a new Float parameter.- Parameters:
value- the new Float value. May be null.distance- the distance between any two points in the open interval.name- the name of the parameter.description- the description of the parameter.
-
-
Method Details
-
getFloat
Returns the value of this parameter as aFloat.- Returns:
- the value of this parameter as a
Float.
-
getMax
Returns the max defined value of this Float parameter.- Returns:
- maximal Float value of this parameter or in general
-
getMin
Returns the min defined value of this Float parameter.- Returns:
- manimal Float value of this parameter or in general
-
isValid
public boolean isValid()Description copied from interface:LimitableParameterReturnstrueif the value is between the minimum and the maximum,falseotherwise.- Returns:
trueif the value is between the minimum and the maximum,falseotherwise.
-
setValue
Sets the value of theAttributeParameter.- Specified by:
setValuein interfaceDisplayable- Overrides:
setValuein classAbstractSingleParameter- Parameters:
value- the new value of theAttributeParameter.
-
setMax
-
setMin
-
setValuesBallSize
Set new intervalue distance.- Parameters:
ball- the change-size between two valid values
-
getValuesBall
Description copied from class:AbstractLimitableParameterThe closed ball diameter exclusive for the current parameter value, such that
v(t) = val
v(t+1) = (val +|- ballDiameter)
whereas t stands for time point.- Specified by:
getValuesBallin classAbstractLimitableParameter- Returns:
- a Number instance
-
getValue
Returns the value of this parameter.- Specified by:
getValuein interfaceDisplayable- Overrides:
getValuein classAbstractSingleParameter- Returns:
- the value of this parameter.
-