|
||||||||||
| PREV NEXT | FRAMES NO FRAMES | |||||||||
| Packages that use Validator | |
|---|---|
| net.protempore.utils | |
| Uses of Validator in net.protempore.utils |
|---|
| Methods in net.protempore.utils that return Validator | |
|---|---|
Validator |
Validator.allElementsOfType(java.util.Collection<?> collection,
java.lang.Class<?> cls)
Verify that the collection reference is non-null and that each element, if any, of the collection is an instance of the given class, as defined by Class.isInstance(Object), using the given error message and
message arguments in case of failure. |
Validator |
Validator.allElementsOfType(java.util.Collection<?> collection,
java.lang.Class<?> cls,
java.lang.String msg,
java.lang.Object... msgArgs)
Verify that the collection reference is non-null and that each element, if any, of the collection is an instance of the given class, as defined by Class.isInstance(Object). |
Validator |
Validator.allElementsOfType(java.util.Map<?,?> map,
java.lang.Class<?> keyClass,
java.lang.Class<?> valueClass)
Verify that the map reference is non-null and that each key in an instance of keyClass and each value is an instance of valueClass, as defined by Class.isInstance(Object). |
Validator |
Validator.allElementsOfType(java.util.Map<?,?> map,
java.lang.Class<?> keyClass,
java.lang.Class<?> valueClass,
java.lang.String msg,
java.lang.Object... msgArgs)
Verify that the map reference is non-null and that each key in an instance of keyClass and each value is an instance of valueClass, as defined by Class.isInstance(Object), using the
given error message and message arguments in case of failure. |
Validator |
Validator.allElementsOfType(java.lang.Object[] array,
java.lang.Class<?> cls)
Verify that the array reference is non-null and that each element, if any, of the array is an instance of the given class, as defined by Class.isInstance(Object), using the given error message and message
arguments in case of failure. |
Validator |
Validator.allElementsOfType(java.lang.Object[] array,
java.lang.Class<?> cls,
java.lang.String msg,
java.lang.Object... msgArgs)
Verify that the array reference is non-null and that each element, if any, of the array is an instance of the given class, as defined by Class.isInstance(Object). |
Validator |
Validator.equal(java.lang.Object expected,
java.lang.Object actual)
Verify that expected is equal (via .equals) to actual, considering 2 null references to be equal. |
Validator |
Validator.equal(java.lang.Object expected,
java.lang.Object actual,
java.lang.String msg,
java.lang.Object... msgArgs)
Verify that expected is equal (via .equals) to actual, considering 2 null references to be equal, using the given error message and message arguments in case of failure. |
Validator |
Validator.isFalse(boolean condition)
Verify that the condition is false. |
Validator |
Validator.isFalse(boolean condition,
java.lang.String msg,
java.lang.Object... msgArgs)
Verify that the condition is false, using the given error message and message arguments in case of failure. |
Validator |
Validator.isNull(java.lang.Object obj)
Verify that the obj reference is null. |
Validator |
Validator.isNull(java.lang.Object obj,
java.lang.String msg,
java.lang.Object... msgArgs)
Verify that the obj reference is null, using the given error message and message
arguments in case of failure. |
Validator |
Validator.isTrue(boolean condition)
Verify that the condition is true. |
Validator |
Validator.isTrue(boolean condition,
java.lang.String msg,
java.lang.Object... msgArgs)
Verify that the condition is true, using the given error message and message arguments in case of failure. |
Validator |
Validator.noNullElements(java.util.Collection<?> collection)
Verify that the collection reference is non-null and contains no null elements. |
Validator |
Validator.noNullElements(java.util.Collection<?> collection,
java.lang.String msg,
java.lang.Object... msgArgs)
Verify that the collection reference is non-null and contains no null elements, using the given error message and message arguments in case of failure. |
Validator |
Validator.noNullElements(java.lang.Object[] array)
Verify that the array reference is non-null and contains no null elements. |
Validator |
Validator.noNullElements(java.lang.Object[] array,
java.lang.String msg,
java.lang.Object... msgArgs)
Verify that the array reference is non-null and contains no null elements, using the given error message and message arguments in case of failure. |
Validator |
Validator.notEmpty(byte[] array)
Verify that the array reference is non-null and has at least 1 element. |
Validator |
Validator.notEmpty(byte[] array,
java.lang.String msg,
java.lang.Object... msgArgs)
Verify that the array reference is non-null and has at least 1 element, using the given error message and message arguments in case of failure. |
Validator |
Validator.notEmpty(java.lang.CharSequence chars)
Verify that the chars reference is non-null and has a length of at least 1. |
Validator |
Validator.notEmpty(java.lang.CharSequence chars,
java.lang.String msg,
java.lang.Object... msgArgs)
Verify that the chars reference is non-null and has a length of at least 1, using the given error message and message arguments in case of failure. |
Validator |
Validator.notEmpty(java.util.Collection<?> collection)
Verify that the collection reference is non-null and has at least 1 element. |
Validator |
Validator.notEmpty(java.util.Collection<?> collection,
java.lang.String msg,
java.lang.Object... msgArgs)
Verify that the collection reference is non-null and has at least 1 element, using the given error message and message arguments in case of failure. |
Validator |
Validator.notEmpty(double[] array)
Verify that the array reference is non-null and has at least 1 element. |
Validator |
Validator.notEmpty(double[] array,
java.lang.String msg,
java.lang.Object... msgArgs)
Verify that the array reference is non-null and has at least 1 element, using the given error message and message arguments in case of failure. |
Validator |
Validator.notEmpty(float[] array)
Verify that the array reference is non-null and has at least 1 element. |
Validator |
Validator.notEmpty(float[] array,
java.lang.String msg,
java.lang.Object... msgArgs)
Verify that the array reference is non-null and has at least 1 element, using the given error message and message arguments in case of failure. |
Validator |
Validator.notEmpty(int[] array)
Verify that the array reference is non-null and has at least 1 element. |
Validator |
Validator.notEmpty(int[] array,
java.lang.String msg,
java.lang.Object... msgArgs)
Verify that the array reference is non-null and has at least 1 element, using the given error message and message arguments in case of failure. |
Validator |
Validator.notEmpty(long[] array)
Verify that the array reference is non-null and has at least 1 element. |
Validator |
Validator.notEmpty(long[] array,
java.lang.String msg,
java.lang.Object... msgArgs)
Verify that the array reference is non-null and has at least 1 element, using the given error message and message arguments in case of failure. |
Validator |
Validator.notEmpty(java.util.Map<?,?> map)
Verify that the map reference is non-null and has at least 1 key-value pair. |
Validator |
Validator.notEmpty(java.util.Map<?,?> map,
java.lang.String msg,
java.lang.Object... msgArgs)
Verify that the map reference is non-null and has at least 1 key-value pair, using the given error message and message arguments in case of failure. |
Validator |
Validator.notEmpty(java.lang.Object[] array)
Verify that the array reference is non-null and has at least 1 element. |
Validator |
Validator.notEmpty(java.lang.Object[] array,
java.lang.String msg,
java.lang.Object... msgArgs)
Verify that the array reference is non-null and has at least 1 element, using the given error message and message arguments in case of failure. |
Validator |
Validator.notEmpty(short[] array)
Verify that the array reference is non-null and has at least 1 element. |
Validator |
Validator.notEmpty(short[] array,
java.lang.String msg,
java.lang.Object... msgArgs)
Verify that the array reference is non-null and has at least 1 element, using the given error message and message arguments in case of failure. |
Validator |
Validator.notEqual(java.lang.Object unexpected,
java.lang.Object actual)
Verify that expected is not equal (via .equals) to actual, considering 2 null references to be equal. |
Validator |
Validator.notEqual(java.lang.Object unexpected,
java.lang.Object actual,
java.lang.String msg,
java.lang.Object... msgArgs)
Verify that expected is not equal (via .equals) to actual, considering 2 null references to be equal, using the given error message and message arguments in case of failure. |
Validator |
Validator.notNull(java.lang.Object obj)
Verify that the obj reference is null. |
Validator |
Validator.notNull(java.lang.Object obj,
java.lang.String msg,
java.lang.Object... msgArgs)
Verify that the obj reference is not null, using the given error message and message
arguments in case of failure. |
Validator |
Validator.notSame(java.lang.Object expected,
java.lang.Object actual)
Verify that actual does not refer to the same object as expected. |
Validator |
Validator.notSame(java.lang.Object expected,
java.lang.Object actual,
java.lang.String msg,
java.lang.Object... msgArgs)
Verify that actual does not refer to the same object as expected, using the given error message and message arguments in case of failure. |
Validator |
Validator.ofType(java.lang.Object object,
java.lang.Class<?> type)
Verify that the object is an instance of type, which may be an interface or a class, as defined by Class.isInstance(Object). |
Validator |
Validator.ofType(java.lang.Object object,
java.lang.Class<?> type,
java.lang.String msg,
java.lang.Object... msgArgs)
Verify that the object is an instance of type, which may be an interface or a class, as defined by Class.isInstance(Object), using the given error message and message arguments in case of
failure. |
Validator |
Validator.same(java.lang.Object expected,
java.lang.Object actual)
Verify that actual refers to the same object as expected (or both are null references). |
Validator |
Validator.same(java.lang.Object expected,
java.lang.Object actual,
java.lang.String msg,
java.lang.Object... msgArgs)
Verify that actual refers to the same object as expected (or both are null references), using the given error message and message arguments in case of failure. |
static Validator |
Validator.validate()
Get a validator that throws a ValidationException in case of failure. |
static Validator |
Validator.validate(java.lang.Class<? extends java.lang.RuntimeException> clazz)
Get a validator that throws an exception of type clazz (and does no logging) in case of failure. |
static Validator |
Validator.validate(java.lang.Class<? extends java.lang.RuntimeException> clazz,
org.apache.commons.logging.Log logger)
Get a validator that logs a failure to the given logger (as an error)and throws an exception of type clazz in case of failure. |
static Validator |
Validator.validate(org.apache.commons.logging.Log logger)
Get a validator that logs a failure (as error) to the given logger and does not throw an exception in case of failure. |
|
||||||||||
| PREV NEXT | FRAMES NO FRAMES | |||||||||