Package org.apache.groovy.contracts.util

# Class Validate

java.lang.Object
org.apache.groovy.contracts.util.Validate

public class Validate extends Object

Internal utility class for in-code assertion checks.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Validate()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static void`
  `isTrue(boolean expression)`
  Asserts that the supplied expression evaluates to `true`.
  `static void`
  `notNull(Object obj)`
  Asserts that the supplied object reference is not `null`.

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

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

- ## Constructor Details

  - ### Validate

    public Validate()

- ## Method Details

  - ### notNull

    public static void notNull(Object obj)
    Asserts that the supplied object reference is not `null`.
    Parameters:
      `obj` - the reference to validate

  - ### isTrue

    public static void isTrue(boolean expression)
    Asserts that the supplied expression evaluates to `true`.
    Parameters:
      `expression` - the boolean expression to validate