Package org.apache.groovy.contracts

# Class PostconditionViolation

java.lang.Object
java.lang.Throwable
java.lang.Error
java.lang.AssertionError
org.apache.groovy.contracts.AssertionViolation
org.apache.groovy.contracts.PostconditionViolation

All Implemented Interfaces:
  `Serializable`

public class PostconditionViolation extends AssertionViolation

Thrown whenever a postcondition violation occurs.

See Also:
  - `AssertionViolation`
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PostconditionViolation()`
  Creates a postcondition violation without an explicit detail message.
  `PostconditionViolation(boolean b)`
  Creates a postcondition violation with a boolean detail.
  `PostconditionViolation(char c)`
  Creates a postcondition violation with a character detail.
  `PostconditionViolation(double v)`
  Creates a postcondition violation with a double-precision detail.
  `PostconditionViolation(float v)`
  Creates a postcondition violation with a floating-point detail.
  `PostconditionViolation(int i)`
  Creates a postcondition violation with an integer detail.
  `PostconditionViolation(long l)`
  Creates a postcondition violation with a long detail.
  `PostconditionViolation(Object o)`
  Creates a postcondition violation with an object-valued detail.

- ## Method Summary

  ### Methods inherited from class java.lang.Throwable

  `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### PostconditionViolation

    public PostconditionViolation()
    Creates a postcondition violation without an explicit detail message.

  - ### PostconditionViolation

    public PostconditionViolation(Object o)
    Creates a postcondition violation with an object-valued detail.
    Parameters:
      `o` - the detail object

  - ### PostconditionViolation

    public PostconditionViolation(boolean b)
    Creates a postcondition violation with a boolean detail.
    Parameters:
      `b` - the detail value

  - ### PostconditionViolation

    public PostconditionViolation(char c)
    Creates a postcondition violation with a character detail.
    Parameters:
      `c` - the detail value

  - ### PostconditionViolation

    public PostconditionViolation(int i)
    Creates a postcondition violation with an integer detail.
    Parameters:
      `i` - the detail value

  - ### PostconditionViolation

    public PostconditionViolation(long l)
    Creates a postcondition violation with a long detail.
    Parameters:
      `l` - the detail value

  - ### PostconditionViolation

    public PostconditionViolation(float v)
    Creates a postcondition violation with a floating-point detail.
    Parameters:
      `v` - the detail value

  - ### PostconditionViolation

    public PostconditionViolation(double v)
    Creates a postcondition violation with a double-precision detail.
    Parameters:
      `v` - the detail value