org.olat.ims.qti.container
Class DecimalVariable

java.lang.Object
  extended by org.olat.ims.qti.container.Variable
      extended by org.olat.ims.qti.container.DecimalVariable
All Implemented Interfaces:
java.io.Serializable

public class DecimalVariable
extends Variable

See Also:
Serialized Form

Constructor Summary
DecimalVariable(java.lang.String varName, java.lang.String maxValue, java.lang.String minValue, java.lang.String cutValue, java.lang.String defaultValue)
           
 
Method Summary
 void add(java.lang.String value)
           
 void divide(java.lang.String value)
           
 float getCutValue()
          Returns the cutValue.
 float getDefaultValue()
          Returns the defaultValue.
 float getMaxValue()
          Returns the maxValue.
 float getMinValue()
          Returns the minValue.
 float getTruncatedValue()
           
 float getValue()
           
 boolean hasCutValue()
           
 boolean hasDefaultValue()
           
 boolean hasMaxValue()
           
 boolean hasMinValue()
           
 boolean isEqual(java.lang.String operand)
           
 boolean isLessThan(java.lang.String operand)
           
 boolean isMoreThan(java.lang.String operand)
           
 void multiply(java.lang.String value)
           
 void reset()
           
 void setValue(java.lang.String value)
           
 void subtract(java.lang.String value)
           
 java.lang.String toString()
           
 
Methods inherited from class org.olat.ims.qti.container.Variable
getVarName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DecimalVariable

public DecimalVariable(java.lang.String varName,
                       java.lang.String maxValue,
                       java.lang.String minValue,
                       java.lang.String cutValue,
                       java.lang.String defaultValue)
Method Detail

reset

public void reset()
Specified by:
reset in class Variable

add

public void add(java.lang.String value)
Specified by:
add in class Variable

subtract

public void subtract(java.lang.String value)
Specified by:
subtract in class Variable

multiply

public void multiply(java.lang.String value)
Specified by:
multiply in class Variable

divide

public void divide(java.lang.String value)
Specified by:
divide in class Variable

getTruncatedValue

public float getTruncatedValue()
Specified by:
getTruncatedValue in class Variable

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

setValue

public void setValue(java.lang.String value)
Specified by:
setValue in class Variable

getCutValue

public float getCutValue()
Returns the cutValue.

Specified by:
getCutValue in class Variable
Returns:
float

getDefaultValue

public float getDefaultValue()
Returns the defaultValue.

Specified by:
getDefaultValue in class Variable
Returns:
float

getMaxValue

public float getMaxValue()
Returns the maxValue.

Specified by:
getMaxValue in class Variable
Returns:
float

getMinValue

public float getMinValue()
Returns the minValue.

Specified by:
getMinValue in class Variable
Returns:
float

hasCutValue

public boolean hasCutValue()
Specified by:
hasCutValue in class Variable
See Also:
Variable.hasCutValue()

hasDefaultValue

public boolean hasDefaultValue()
Specified by:
hasDefaultValue in class Variable
See Also:
Variable.hasDefaultValue()

hasMaxValue

public boolean hasMaxValue()
Specified by:
hasMaxValue in class Variable
See Also:
Variable.hasMaxValue()

hasMinValue

public boolean hasMinValue()
Specified by:
hasMinValue in class Variable
See Also:
Variable.hasMinValue()

getValue

public float getValue()
Specified by:
getValue in class Variable
See Also:
Variable.getValue()

isLessThan

public boolean isLessThan(java.lang.String operand)
Specified by:
isLessThan in class Variable
See Also:
Variable.isLessThan(java.lang.String)

isMoreThan

public boolean isMoreThan(java.lang.String operand)
Specified by:
isMoreThan in class Variable
See Also:
Variable.isMoreThan(java.lang.String)

isEqual

public boolean isEqual(java.lang.String operand)
Specified by:
isEqual in class Variable
See Also:
Variable.isEqual(java.lang.String)