|
Kie Commons Validation 6.0.0.Beta2 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.kie.commons.validation.PortablePreconditions
public class PortablePreconditions
Helper class for parameters validation, such as not null arguments.
| Constructor Summary | |
|---|---|
protected |
PortablePreconditions()
Should not be instantiated |
| Method Summary | ||
|---|---|---|
static void |
checkCondition(String name,
boolean condition)
Assert that this parameter is marked as valid by the condition passed as parameter. |
|
static
|
checkEachParameterNotNull(String name,
T... parameters)
Assert that this parameter is not null, as also each item of the array is not null. |
|
static void |
checkNotEmpty(String name,
Map<?,?> parameter)
Assert that this parameter is not empty. |
|
static String |
checkNotEmpty(String name,
String parameter)
Assert that this parameter is not empty. |
|
static
|
checkNotEmpty(String name,
T parameter)
Assert that this parameter is not empty. |
|
static
|
checkNotEmpty(String name,
T[] parameter)
Assert that this parameter is not empty. |
|
static
|
checkNotNull(String name,
T parameter)
Assert that this parameter is not null. |
|
static void |
checkNullMandatory(String name,
Object parameter)
Assert that this parameter is null. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected PortablePreconditions()
| Method Detail |
|---|
public static void checkCondition(String name,
boolean condition)
name - of parametercondition - itself
public static <T> void checkEachParameterNotNull(String name,
T... parameters)
T - parameter typename - of parameterparameters - itself
public static <T extends Collection<?>> T checkNotEmpty(String name,
T parameter)
name - of parameterparameter - itself
public static void checkNotEmpty(String name,
Map<?,?> parameter)
name - of parameterparameter - itself
public static String checkNotEmpty(String name,
String parameter)
name - of parameterparameter - itself
public static <T> T[] checkNotEmpty(String name,
T[] parameter)
T - type of the arrayname - of parameterparameter - itself
public static <T> T checkNotNull(String name,
T parameter)
name - of parameterparameter - itself
public static void checkNullMandatory(String name,
Object parameter)
name - of parameterparameter - itself
|
Kie Commons Validation 6.0.0.Beta2 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||