org.qtitools.qti.node.expression.general
Class RandomIntegerEx

java.lang.Object
  extended by org.qtitools.qti.node.AbstractNode
      extended by org.qtitools.qti.node.AbstractObject
          extended by org.qtitools.qti.node.expression.AbstractExpression
              extended by org.qtitools.qti.node.expression.RandomExpression
                  extended by org.qtitools.qti.node.expression.general.RandomInteger
                      extended by org.qtitools.qti.node.expression.general.RandomIntegerEx
All Implemented Interfaces:
java.io.Serializable, Expression, ExpressionParent, XmlNode, XmlObject, Validatable

public class RandomIntegerEx
extends RandomInteger

Extends randomInteger expression - supports seed attribute.

This expression should be used only for special purposes when you need repeatability (not for real assessments).

Author:
Jiri Kajaba
See Also:
Serialized Form

Field Summary
static java.lang.Long ATTR_SEED_DEFAULT_VALUE
          Default value of seed attribute.
static java.lang.String ATTR_SEED_NAME
          Name of seed attribute in xml schema.
static java.lang.String CLASS_TAG
          Name of this class in xml schema.
 
Fields inherited from class org.qtitools.qti.node.expression.general.RandomInteger
ATTR_MAXIMUM_NAME, ATTR_MINIMUM_NAME, ATTR_STEP_DEFAULT_VALUE, ATTR_STEP_NAME
 
Fields inherited from class org.qtitools.qti.node.expression.AbstractExpression
logger
 
Fields inherited from interface org.qtitools.qti.node.expression.Expression
DISPLAY_NAME
 
Fields inherited from interface org.qtitools.qti.node.XmlNode
INDENT, NEW_LINE, SIMPLE_NAME_INNER_SEPARATOR, SIMPLE_NAMES_SEPARATOR
 
Constructor Summary
RandomIntegerEx(ExpressionParent parent)
          Constructs expression.
 
Method Summary
 java.lang.String getClassTag()
          Gets QTI class name of this node.
 java.lang.Long getSeedAttributeValue()
          Gets value of seed attribute.
 boolean isVariable()
          Returns true if value of evaluation can change every evaluation call; false otherwise.
 void setSeedAttributeValue(java.lang.Long seed)
          Sets new value of seed attribute.
 
Methods inherited from class org.qtitools.qti.node.expression.general.RandomInteger
evaluateSelf, getMaximum, getMinimum, getStep, setMaximum, setMinimum, setStep, validateAttributes
 
Methods inherited from class org.qtitools.qti.node.expression.RandomExpression
getRandomGenerator
 
Methods inherited from class org.qtitools.qti.node.expression.AbstractExpression
evaluate, getBaseType, getCardinality, getChildren, getFirstChild, getParent, getParentRequiredBaseTypes, getParentRequiredCardinalities, getProducedBaseTypes, getProducedCardinalities, getProducedNumericalBaseTypes, getRequiredBaseTypes, getRequiredCardinalities, getRequiredSameBaseTypes, getRequiredSameCardinalities, getSecondChild, getType, getValue, isAnyChildNull, isNull, reset, toString, validate
 
Methods inherited from class org.qtitools.qti.node.AbstractObject
getParentItem, getParentResult, getParentTest, setParent
 
Methods inherited from class org.qtitools.qti.node.AbstractNode
attrToXmlString, bodyToXmlString, getAttributes, getFullName, getIndent, getNode, getNode, getNode, getNodeGroups, getParentRoot, getSimpleName, getSourceFile, getSourceNode, getSourceString, getSourceUrl, hasChildNodes, load, load, load, load, loadAttributes, readChild, readChildren, setParent, setSourceFile, setSourceNode, setSourceString, setSourceUrl, toXmlString, toXmlString, validateChildren
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.qtitools.qti.node.XmlObject
getParentItem, getParentResult, getParentTest, setParent
 
Methods inherited from interface org.qtitools.qti.node.XmlNode
getAttributes, getFullName, getNodeGroups, getParentRoot, getSimpleName, getSourceFile, getSourceNode, getSourceString, getSourceUrl, hasChildNodes, load, load, load, load, setSourceFile, setSourceNode, setSourceString, setSourceUrl, toXmlString, toXmlString
 

Field Detail

CLASS_TAG

public static final java.lang.String CLASS_TAG
Name of this class in xml schema.

See Also:
Constant Field Values

ATTR_SEED_NAME

public static final java.lang.String ATTR_SEED_NAME
Name of seed attribute in xml schema.

See Also:
Constant Field Values

ATTR_SEED_DEFAULT_VALUE

public static final java.lang.Long ATTR_SEED_DEFAULT_VALUE
Default value of seed attribute.

Constructor Detail

RandomIntegerEx

public RandomIntegerEx(ExpressionParent parent)
Constructs expression.

Parameters:
parent - parent of this expression
Method Detail

getClassTag

public java.lang.String getClassTag()
Description copied from interface: XmlNode
Gets QTI class name of this node.

QTI class name has very important role during loading/saving nodes.

For example: Java class name is AssessmentTest; QTI class name is assessmentTest.

Specified by:
getClassTag in interface XmlNode
Overrides:
getClassTag in class RandomInteger
Returns:
QTI class name of this node

getSeedAttributeValue

public java.lang.Long getSeedAttributeValue()
Description copied from class: RandomExpression
Gets value of seed attribute.

Overrides:
getSeedAttributeValue in class RandomInteger
Returns:
value of seed attribute

setSeedAttributeValue

public void setSeedAttributeValue(java.lang.Long seed)
Sets new value of seed attribute.

Parameters:
seed - new value of seed attribute
See Also:
getSeedAttributeValue()

isVariable

public boolean isVariable()
Description copied from interface: Expression
Returns true if value of evaluation can change every evaluation call; false otherwise. It checks this expression and all of its children (if any child is variable, this expression becomes variable too). Example of variable expressions: variable and outcome expressions.

Specified by:
isVariable in interface Expression
Overrides:
isVariable in class RandomInteger
Returns:
true if value of evaluation can change every evaluation call; false otherwise


Copyright © 2009. All Rights Reserved.