tcra.exercises.queue_reasoning_private
Class QueueEnqueueContract
java.lang.Object
tcra.math.MethodContract
tcra.exercises.queue_reasoning_private.QueueEnqueueContract
public class QueueEnqueueContract
- extends MethodContract
|
Method Summary |
boolean |
check(java.lang.String[] input)
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
lb_self
protected MathString<MathType> lb_self
self
protected MathString<MathType> self
lb_arg
protected MathInteger lb_arg
arg
protected MathInteger arg
QueueEnqueueContract
public QueueEnqueueContract()
check
public boolean check(java.lang.String[] input)
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:
input - 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