org.problets.domain.model.expression.step
Class AbstractExpressionStep

java.lang.Object
  extended by org.problets.domain.line.AbstractLine
      extended by org.problets.domain.line.AbstractExplanationLine
          extended by org.problets.domain.model.expression.step.AbstractExpressionStep
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
ExpressionStep, ExpressionStepSequence, ExpressionViewStep

public class AbstractExpressionStep
extends AbstractExplanationLine

Serves as the base class for ExpressionStep and ExpressionView Step

Author:
Amruth Kumar

Field Summary
 
Fields inherited from class org.problets.domain.line.AbstractLine
UNASSIGNED_LINE
 
Constructor Summary
AbstractExpressionStep()
          Default constructor being defined as a step towards unhooking ExpressionViewStep from any data members defined in AbstractExpressionStep class.
AbstractExpressionStep(int inOrder, java.lang.String inResult)
          Constructor for AbstractExpressionStep
 
Method Summary
 int getOrder()
           
 java.lang.String getResult()
           
 void print()
          Prints all the fields of the class
static java.lang.String replaceTagDelimiters(java.lang.String inExpression)
          Replaces < and << in expression so that TextFormatter does not read them as tag delimiter
 void setOrder(int inOrder)
          Method returns true of this step is the same as the parameter public boolean equals( AbstractExpressionStep parameter ) { boolean returnValue = true; returnValue = returnValue && ( order == parameter.order ); if( !returnValue ) return returnValue; returnValue = returnValue && ( result.equalsIgnoreCase( parameter.result ) ); return returnValue; }
 void setResult(java.lang.String inResult)
           
 java.lang.String toString()
          Returns only that which is entered into the log
 
Methods inherited from class org.problets.domain.line.AbstractExplanationLine
getEvent, getExplainer, getFeedbackAmount, setFeedbackAmount
 
Methods inherited from class org.problets.domain.line.AbstractLine
clone, getLineNumber, setLineNumber
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractExpressionStep

public AbstractExpressionStep(int inOrder,
                              java.lang.String inResult)
Constructor for AbstractExpressionStep


AbstractExpressionStep

public AbstractExpressionStep()
Default constructor being defined as a step towards unhooking ExpressionViewStep from any data members defined in AbstractExpressionStep class.

Method Detail

getOrder

public int getOrder()

getResult

public java.lang.String getResult()

setOrder

public void setOrder(int inOrder)
Method returns true of this step is the same as the parameter public boolean equals( AbstractExpressionStep parameter ) { boolean returnValue = true; returnValue = returnValue && ( order == parameter.order ); if( !returnValue ) return returnValue; returnValue = returnValue && ( result.equalsIgnoreCase( parameter.result ) ); return returnValue; }


setResult

public void setResult(java.lang.String inResult)

toString

public java.lang.String toString()
Description copied from class: AbstractExplanationLine
Returns only that which is entered into the log

Specified by:
toString in class AbstractExplanationLine

replaceTagDelimiters

public static java.lang.String replaceTagDelimiters(java.lang.String inExpression)
Replaces < and << in expression so that TextFormatter does not read them as tag delimiter


print

public void print()
Description copied from class: AbstractExplanationLine
Prints all the fields of the class

Specified by:
print in class AbstractExplanationLine