org.hibernate.validator.internal.util

## Class Contracts

- java.lang.Object
- - org.hibernate.validator.internal.util.Contracts

-     public final class Contracts
      extends Object

  Author:
    Gunnar Morling, Hardy Ferentschik, Kevin Pollet (C) 2012 SERLI

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `assertNotEmpty(String s, String message)`
    `static void` | `assertNotNull(Object o)`
    `static void` | `assertNotNull(Object o, String message)` Asserts that the given object is not `null`.
    `static void` | `assertTrue(boolean condition, String message)`
    `static void` | `assertValueNotNull(Object o, String name)` Asserts that the given object is not `null`.

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

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

- - ### Method Detail

    - #### assertNotNull

          public static void assertNotNull(Object o)

    - #### assertNotNull

          public static void assertNotNull(Object o,
                           String message)

      Asserts that the given object is not `null`.
      Parameters:
        `o` - The object to check.
        `message` - A message text which will be used as message of the resulting exception if the given object is `null`.
      Throws:
        `IllegalArgumentException` - In case the given object is `null`.

    - #### assertValueNotNull

          public static void assertValueNotNull(Object o,
                                String name)

      Asserts that the given object is not `null`.
      Parameters:
        `o` - The object to check.
        `name` - The name of the value to check. A message of the form "<name> must not be null" will be used as message of the resulting exception if the given object is `null`.
      Throws:
        `IllegalArgumentException` - In case the given object is `null`.

    - #### assertTrue

          public static void assertTrue(boolean condition,
                        String message)

    - #### assertNotEmpty

          public static void assertNotEmpty(String s,
                            String message)

Copyright © 2007-2014 Red Hat, Inc. All Rights Reserved