Package: org.apache.groovy.contracts

## [Java] Class PreconditionViolation

- org.apache.groovy.contracts.PreconditionViolation

-     public class PreconditionViolation
      extends AssertionViolation

  Thrown whenever a precondition violation occurs.

  See Also:
    AssertionViolation

- - ### Constructor Summary

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

- - ### Constructor Detail

    - #### public PreconditionViolation()

      Creates a precondition violation without an explicit detail message.

    - #### public PreconditionViolation(Object o)

      Creates a precondition violation with an object-valued detail.

      Parameters:
        `o` - the detail object

    - #### public PreconditionViolation(boolean b)

      Creates a precondition violation with a boolean detail.

      Parameters:
        `b` - the detail value

    - #### public PreconditionViolation(char c)

      Creates a precondition violation with a character detail.

      Parameters:
        `c` - the detail value

    - #### public PreconditionViolation(int i)

      Creates a precondition violation with an integer detail.

      Parameters:
        `i` - the detail value

    - #### public PreconditionViolation(long l)

      Creates a precondition violation with a long detail.

      Parameters:
        `l` - the detail value

    - #### public PreconditionViolation(float v)

      Creates a precondition violation with a floating-point detail.

      Parameters:
        `v` - the detail value

    - #### public PreconditionViolation(double v)

      Creates a precondition violation with a double-precision detail.

      Parameters:
        `v` - the detail value