tcra.exercises.stack_reasoning_private
Class StackClearContract

java.lang.Object
  extended by tcra.math.MethodContract
      extended by tcra.exercises.stack_reasoning_private.StackClearContract

public class StackClearContract
extends MethodContract


Field Summary
protected  MathString<MathType> lb_self
           
protected  MathString<MathType> self
           
 
Fields inherited from class tcra.math.MethodContract
args, name, postcondition, precondition, returnType
 
Constructor Summary
StackClearContract()
           
 
Method Summary
 boolean check(java.lang.String[] l)
          Returns whether the supplied values hold to the precondition and postcondition using the Assertions' check method.
It is recommended that the parsed input is saved in a private variable of any extending class for use in the toInstanceString method.
 java.lang.String toInstanceString()
           
 java.lang.String toString()
           
 
Methods inherited from class tcra.math.MethodContract
getArgs, getMethodName, getPostcondition, getPrecondition, getReturnType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

lb_self

protected MathString<MathType> lb_self

self

protected MathString<MathType> self
Constructor Detail

StackClearContract

public StackClearContract()
Method Detail

check

public boolean check(java.lang.String[] l)
              throws MathFormatException
Description copied from class: MethodContract
Returns whether the supplied values hold to the precondition and postcondition using the Assertions' check method.
It is recommended that the parsed input is saved in a private variable of any extending class for use in the toInstanceString method.

Specified by:
check in class MethodContract
Parameters:
l - User input obtained from the GUI. Must be parsed by the contract to obtain the correct MathType objects
Returns:
true if the user input is parsed correctly and the values hold to the pre and postconditions. false if the values do not hold to the precondition and postcondition.
Throws:
MathFormatException - If the parsing of the user input goes awry.

toString

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

toInstanceString

public java.lang.String toInstanceString()
Specified by:
toInstanceString in class MethodContract