Top Fields Constructors Methods
org.hibernate.validator.internal.util

public final Class Contracts

extends Object
Class Inheritance
Static Imports
org.hibernate.validator.internal.util.logging.Messages.MESSAGES

Authors
Gunnar Morling, Hardy Ferentschik, Kevin Pollet <[email protected]> (C) 2012 SERLI

Field Summary

Modifier and TypeField and Description
private static final Log

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static void
public static void
assertNotEmpty(Collection<?> collection, String message)

public static void
assertNotEmpty(Collection<?> collection, String message, Object... messageParameters)

public static void
assertNotEmpty(Object[] array, String message)

public static void
assertNotEmpty(byte[] array, String message)

public static void
assertNotEmpty(short[] array, String message)

public static void
assertNotEmpty(int[] array, String message)

public static void
assertNotEmpty(long[] array, String message)

public static void
assertNotEmpty(float[] array, String message)

public static void
assertNotEmpty(double[] array, String message)

public static void
assertNotEmpty(boolean[] array, String message)

public static void
assertNotEmpty(char[] array, String message)

public static void
public static void
assertNotNull(Object
The object to check.
o
,
String
A message text which will be used as message of the resulting exception if the given object is null.
message
)

Asserts that the given object is not null.

public static void
assertTrue(boolean condition, String message)

public static void
assertTrue(boolean condition, String message, Object... messageParameters)

public static void
assertValueNotNull(Object
The object to check.
o
,
String
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.
name
)

Asserts that the given object is not null.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

LOGback to summary
private static final Log LOG

Constructor Detail

Contractsback to summary
private Contracts()

Method Detail

assertNotEmptyback to summary
public static void assertNotEmpty(String s, String message)
assertNotEmptyback to summary
public static void assertNotEmpty(Collection<?> collection, String message)
assertNotEmptyback to summary
public static void assertNotEmpty(Collection<?> collection, String message, Object... messageParameters)
assertNotEmptyback to summary
public static void assertNotEmpty(Object[] array, String message)
assertNotEmptyback to summary
public static void assertNotEmpty(byte[] array, String message)
assertNotEmptyback to summary
public static void assertNotEmpty(short[] array, String message)
assertNotEmptyback to summary
public static void assertNotEmpty(int[] array, String message)
assertNotEmptyback to summary
public static void assertNotEmpty(long[] array, String message)
assertNotEmptyback to summary
public static void assertNotEmpty(float[] array, String message)
assertNotEmptyback to summary
public static void assertNotEmpty(double[] array, String message)
assertNotEmptyback to summary
public static void assertNotEmpty(boolean[] array, String message)
assertNotEmptyback to summary
public static void assertNotEmpty(char[] array, String message)
assertNotNullback to summary
public static void assertNotNull(Object o)
assertNotNullback to summary
public static void assertNotNull(Object o, String message)

Asserts that the given object is not null.

Parameters
o:Object

The object to check.

message:String

A message text which will be used as message of the resulting exception if the given object is null.

Exceptions
IllegalArgumentException:
In case the given object is null.
assertTrueback to summary
public static void assertTrue(boolean condition, String message)
assertTrueback to summary
public static void assertTrue(boolean condition, String message, Object... messageParameters)
assertValueNotNullback to summary
public static void assertValueNotNull(Object o, String name)

Asserts that the given object is not null.

Parameters
o:Object

The object to check.

name:String

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.

Exceptions
IllegalArgumentException:
In case the given object is null.