|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.problets.domain.model.DomainModel
org.problets.domain.model.expression.node.NodeModel
org.problets.domain.model.expression.node.operator.Operator
org.problets.domain.model.expression.node.operator.misc.Parenthesis
public class Parenthesis
To represent the parenthesis operator
Field Summary | |
---|---|
static boolean |
isSeparateStep
|
static java.lang.String |
SYMBOL
|
Fields inherited from class org.problets.domain.model.expression.node.operator.Operator |
---|
INCORRECT_OPERAND_COUNT |
Constructor Summary | |
---|---|
Parenthesis(java.lang.String inTemplate,
ActivationRecord inActivationRecord)
|
Method Summary | |
---|---|
Value |
evaluate()
Method to detect any errors before subclasses evaluate expressions Not to be used by client. |
void |
explain(java.util.Vector explanation,
java.util.Vector errors)
Textually explains the evaluation of the tree - as opposed to graphical explanation by the view. |
java.lang.String |
getEmbeddedContent()
|
Expression |
getExpression()
Returns reference to embedded expression |
java.lang.String |
getNonRecursiveContent()
Return just the sub-expression corresponding to this node |
java.lang.String |
getQualifiedLearningObject()
Method returns the name of the operator, disambiguated enough so that it can be easily credited in the student model. |
java.lang.String |
getRecursiveContent()
|
NodeModel |
getStudentCopy()
Called by ParenthesizedStudentNodeView |
static void |
main(java.lang.String[] args)
|
void |
recursiveSetValue(java.lang.String inValue)
Overrides NodeModel's function - do not call this function directly, call NodeModel.skip() or NodeModel.shortCircuit() instead |
void |
setExpression(Expression inExpression)
Called by ParenthesisView when reconstructing student's answer from bailed over operands |
Methods inherited from class org.problets.domain.model.expression.node.operator.Operator |
---|
clone, coerceToReal, contentEquals, contentEquals, getArity, getAssociativity, getLocalLearningObjectives, getOperatorType, getPrecedence, getSymbol, grade, locateOperator, recursiveContentEquals |
Methods inherited from class org.problets.domain.model.expression.node.NodeModel |
---|
classifyNodes, getContent, getLeftChild, getOrder, getPosition, getRightChild, getSideEffects, getValue, insertInOrder, setLeftChild, setOrder, setPosition, setRightChild, setValue, shortCircuit, skip, subExpToString, toString, valueEquals |
Methods inherited from class org.problets.domain.model.DomainModel |
---|
getId, getIdName, grade |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static boolean isSeparateStep
public static final java.lang.String SYMBOL
Constructor Detail |
---|
public Parenthesis(java.lang.String inTemplate, ActivationRecord inActivationRecord)
Method Detail |
---|
public java.lang.String getRecursiveContent()
getRecursiveContent
in class NodeModel
public Expression getExpression()
public java.lang.String getEmbeddedContent()
public NodeModel getStudentCopy()
getStudentCopy
in class Operator
public java.lang.String getQualifiedLearningObject()
getQualifiedLearningObject
in class Operator
public java.lang.String getNonRecursiveContent()
getNonRecursiveContent
in class NodeModel
public void setExpression(Expression inExpression)
public void recursiveSetValue(java.lang.String inValue)
recursiveSetValue
in class Operator
public Value evaluate()
Operator
evaluate
in class Operator
public void explain(java.util.Vector explanation, java.util.Vector errors)
explain
in class Operator
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |