StackPushContract
Date: 2007-08-07

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## tcra.exercises
Class StackPushContract

    java.lang.Object
      tcra.exercises.StackPushContract

All Implemented Interfaces:
  MethodContract

    public class StackPushContract

extends java.lang.Object
implements MethodContract

Constructor Summary
`StackPushContract()`

Method Summary
`java.lang.String` | `check(java.lang.StringBuilder[] input)` Returns whether the supplied values hold to the precondition and postcondition using the Assertions' check method.
`java.util.List<Argument>` | `getArgs()` Returns the list of arguments required by this method.
`java.lang.String` | `getName()` Returns the siganture of the method being tested.
`Assertion` | `getPostcondition()` Returns the postconditional Assertion.
`Assertion` | `getPrecondition()` Returns the preconditional Assertion.
`Argument.Type` | `getReturnType()` Returns the programming type of what is returned from this method.
`java.lang.String` | `toString()`
`java.lang.String` | `toString(java.util.List<MathType> argVals)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### StackPushContract

    public StackPushContract()

Method Detail

### check

    public java.lang.String check(java.lang.StringBuilder[] input)

  Description copied from interface: `MethodContract`
  Returns whether the supplied values hold to the precondition and postcondition using the Assertions' check method.

  Specified by:
    `check` in interface `MethodContract`
  Parameters:
    `input` - User input obtained from the GUI. Must be parsed by the contract to obtain the correct MathType objects
  Returns:
    String from `toString(List l)` if the values supplied for the arguments of the method satisfy both the precondition and postcondition.
    "unparsable_argument" is returned if an error occurs during parsing of the input.
    "null_argument" is returned if any input string is null.
    `null` is returned if the input does not satisfy the precondition and postcondition

### toString

    public java.lang.String toString()

  Specified by:
    `toString` in interface `MethodContract`
  Overrides:
    `toString` in class `java.lang.Object`

### toString

    public java.lang.String toString(java.util.List<MathType> argVals)

  Specified by:
    `toString` in interface `MethodContract`

### getReturnType

    public Argument.Type getReturnType()

  Description copied from interface: `MethodContract`
  Returns the programming type of what is returned from this method.

  Specified by:
    `getReturnType` in interface `MethodContract`
  Returns:
    programming type of the return value

### getName

    public java.lang.String getName()

  Description copied from interface: `MethodContract`
  Returns the siganture of the method being tested.

  Specified by:
    `getName` in interface `MethodContract`
  Returns:
    the signature of the method

### getPrecondition

    public Assertion getPrecondition()

  Description copied from interface: `MethodContract`
  Returns the preconditional Assertion.

  Specified by:
    `getPrecondition` in interface `MethodContract`
  Returns:
    the preconditional assertion

### getPostcondition

    public Assertion getPostcondition()

  Description copied from interface: `MethodContract`
  Returns the postconditional Assertion.

  Specified by:
    `getPostcondition` in interface `MethodContract`
  Returns:
    the postconditional assertion

### getArgs

    public java.util.List<Argument> getArgs()

  Description copied from interface: `MethodContract`
  Returns the list of arguments required by this method.

  Specified by:
    `getArgs` in interface `MethodContract`
  Returns:
    list of Arguments

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD