org.problets.domain.model.expression.node.operator.assignment
Class PostfixAssignment
java.lang.Object
org.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.assignment.Assignment
org.problets.domain.model.expression.node.operator.assignment.PostfixAssignment
- All Implemented Interfaces:
- java.lang.Cloneable
- Direct Known Subclasses:
- PostfixDecrement, PostfixIncrement
public abstract class PostfixAssignment
- extends Assignment
Serves as the base class for postfix increment and decrement operators
- Since:
- 5 / 26 / 2008
- Author:
- Amruth Kumar
Fields inherited from class org.problets.domain.model.DomainModel |
BOOLEAN, BREAKPOINT, CHARACTER, DOUBLE_PRECISION_REAL, ERROR_TYPE, EVAL_STATUS, expACTION, expASSIGNMENT, expAUTO_DEALLOCATION, expCALL, expCONDITION, expDECLARATION, expDEREFERENCING, expDYNAMIC_ALLOCATION, expDYNAMIC_ALLOCATION_INITIALIZATION, expDYNAMIC_DEALLOCATION, expELSE_CLAUSE, expERROR, expEXECUTION, expIF_CLAUSE, expINITIALIZATION, expINPUT, expPARAMETER_PASSING, expPRINT, expQUESTIONABLE, expREFERENCING, expRETURN, expRUNTIME_ERROR, expSEMANTIC_ERROR, expSYNTAX_ERROR, expUPDATE, IDENTITY, MAX_OBJECT_IDENTITY, MIN_OBJECT_IDENTITY, QUADRUPLE_PRECISION_REAL, RUNTIME_ERROR, SEMANTIC_ERROR, SIGNED_INTEGER, SIGNED_LONG, SIGNED_SHORT, SINGLE_PRECISION_REAL, SYNTAX_ERROR, UNDEFINED_TYPE, UNSIGNED_INTEGER, UNSIGNED_LONG, UNSIGNED_SHORT, WARNING |
Constructor Summary |
PostfixAssignment(java.lang.String inSymbol,
int inPrecedence,
java.lang.String inAssociativity,
int inArity)
|
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 |
void |
getLocalLearningObjectives(java.util.Vector learnObjVector)
Overrides Operator.getLocalLearningObjectives() |
static void |
main(java.lang.String[] args)
|
Methods inherited from class org.problets.domain.model.expression.node.operator.Operator |
coerceToReal, contentEquals, contentEquals, getArity, getAssociativity, getOperatorType, getPrecedence, getQualifiedLearningObject, getSymbol, grade, locateOperator, recursiveContentEquals, recursiveSetValue |
Methods inherited from class org.problets.domain.model.expression.node.NodeModel |
classifyNodes, getContent, getLeftChild, getNonRecursiveContent, getOrder, getPosition, getRecursiveContent, getRightChild, getValue, insertInOrder, setLeftChild, setOrder, setPosition, setRightChild, setValue, shortCircuit, skip, subExpToString, toString, valueEquals |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
PostfixAssignment
public PostfixAssignment(java.lang.String inSymbol,
int inPrecedence,
java.lang.String inAssociativity,
int inArity)
getLocalLearningObjectives
public void getLocalLearningObjectives(java.util.Vector learnObjVector)
- Overrides Operator.getLocalLearningObjectives()
- Overrides:
getLocalLearningObjectives
in class Operator
evaluate
public Value evaluate()
- Description copied from class:
Assignment
- Method to detect any errors before subclasses evaluate expressions
Not to be used by client.
Checks if LHS is a variable, and RHS evaluates correctly
- Overrides:
evaluate
in class Assignment
explain
public 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
- Overrides:
explain
in class Operator
main
public static void main(java.lang.String[] args)