Package org.apache.groovy.contracts

# Class LoopInvariantViolation

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

All Implemented Interfaces:
  `Serializable`

public class LoopInvariantViolation extends AssertionViolation

Thrown whenever a loop invariant violation occurs.

Since:
  6.0.0
See Also:
  - `AssertionViolation`
  - Serialized Form

- ## Constructor Summary

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

  - ### LoopInvariantViolation

    public LoopInvariantViolation()
    Creates a loop-invariant violation without an explicit detail message.

  - ### LoopInvariantViolation

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

  - ### LoopInvariantViolation

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

  - ### LoopInvariantViolation

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

  - ### LoopInvariantViolation

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

  - ### LoopInvariantViolation

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

  - ### LoopInvariantViolation

    public LoopInvariantViolation(float f)
    Creates a loop-invariant violation with a floating-point detail.
    Parameters:
      `f` - the detail value

  - ### LoopInvariantViolation

    public LoopInvariantViolation(double d)
    Creates a loop-invariant violation with a double-precision detail.
    Parameters:
      `d` - the detail value