Package org.apache.groovy.contracts

# Class ClassInvariantViolation

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

All Implemented Interfaces:
  `Serializable`

public class ClassInvariantViolation extends AssertionViolation

Thrown whenever a class invariant violation occurs.

See Also:
  - `AssertionViolation`
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ClassInvariantViolation()`
  Creates a class-invariant violation without an explicit detail message.
  `ClassInvariantViolation(boolean b)`
  Creates a class-invariant violation with a boolean detail.
  `ClassInvariantViolation(char c)`
  Creates a class-invariant violation with a character detail.
  `ClassInvariantViolation(double v)`
  Creates a class-invariant violation with a double-precision detail.
  `ClassInvariantViolation(float v)`
  Creates a class-invariant violation with a floating-point detail.
  `ClassInvariantViolation(int i)`
  Creates a class-invariant violation with an integer detail.
  `ClassInvariantViolation(long l)`
  Creates a class-invariant violation with a long detail.
  `ClassInvariantViolation(Object o)`
  Creates a class-invariant 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

  - ### ClassInvariantViolation

    public ClassInvariantViolation()
    Creates a class-invariant violation without an explicit detail message.

  - ### ClassInvariantViolation

    public ClassInvariantViolation(Object o)
    Creates a class-invariant violation with an object-valued detail.
    Parameters:
      `o` - the detail object

  - ### ClassInvariantViolation

    public ClassInvariantViolation(boolean b)
    Creates a class-invariant violation with a boolean detail.
    Parameters:
      `b` - the detail value

  - ### ClassInvariantViolation

    public ClassInvariantViolation(char c)
    Creates a class-invariant violation with a character detail.
    Parameters:
      `c` - the detail value

  - ### ClassInvariantViolation

    public ClassInvariantViolation(int i)
    Creates a class-invariant violation with an integer detail.
    Parameters:
      `i` - the detail value

  - ### ClassInvariantViolation

    public ClassInvariantViolation(long l)
    Creates a class-invariant violation with a long detail.
    Parameters:
      `l` - the detail value

  - ### ClassInvariantViolation

    public ClassInvariantViolation(float v)
    Creates a class-invariant violation with a floating-point detail.
    Parameters:
      `v` - the detail value

  - ### ClassInvariantViolation

    public ClassInvariantViolation(double v)
    Creates a class-invariant violation with a double-precision detail.
    Parameters:
      `v` - the detail value