Package: org.apache.groovy.contracts.domain

## [Java] Class Postcondition

- org.apache.groovy.contracts.domain.Postcondition

-     public class Postcondition
      extends Assertion

  A post-condition assertion.

- - ### Constructor Summary

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

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public boolean` | `isPartOfConstructor()` Indicates whether this postcondition was declared for a constructor.

  - ### Inherited Methods Summary

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

- - ### Constructor Detail

    - #### public Postcondition()

      Creates a postcondition that defaults to `true`.

    - #### public Postcondition(BlockStatement blockStatement, BooleanExpression booleanExpression, boolean isPartOfConstructor)

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

      Parameters:
        `blockStatement` - the original postcondition block
        `booleanExpression` - the normalized postcondition expression
        `isPartOfConstructor` - whether the postcondition belongs to a constructor

  - ### Method Detail

    - #### public boolean isPartOfConstructor()

      Indicates whether this postcondition was declared for a constructor.

      Returns:
        `true` if the postcondition belongs to a constructor