Package: org.apache.groovy.contracts.domain

## [Java] Class Precondition

- org.apache.groovy.contracts.domain.Precondition

-     public class Precondition
      extends Assertion

  A pre-condition assertion.

- - ### Constructor Summary

    Constructors
    Constructor and description
    `Precondition()` Creates a precondition that defaults to `true`.
    `Precondition(BlockStatement blockStatement, BooleanExpression booleanExpression)` Creates a precondition from the supplied source block and boolean expression.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Assertion` | `and, booleanExpression, or, originalBlockStatement, renew`

- - ### Constructor Detail

    - #### public Precondition()

      Creates a precondition that defaults to `true`.

    - #### public Precondition(BlockStatement blockStatement, BooleanExpression booleanExpression)

      Creates a precondition from the supplied source block and boolean expression.

      Parameters:
        `blockStatement` - the original precondition block
        `booleanExpression` - the normalized precondition expression