Class ObjectPredicate<T>
- java.lang.Object
-
- org.solidcoding.validation.predicates.ObjectPredicate<T>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T> ObjectPredicate<T>beA(Class<T> clazz)static <T> ObjectPredicate<T>beAn(Class<T> clazz)booleantest(T value)ObjectPredicate<T>that(Predicate<T> rule)
-
-
-
Method Detail
-
beA
public static <T> ObjectPredicate<T> beA(Class<T> clazz)
- Type Parameters:
T- the type upon which the validations are tested.- Parameters:
clazz- the class of the object to validate. This is only a compiler flag to treat T as its instance.- Returns:
- ObjectPredicate to continue adding rules.
-
beAn
public static <T> ObjectPredicate<T> beAn(Class<T> clazz)
- Type Parameters:
T- the type upon which the validations are tested.- Parameters:
clazz- the class of the object to validate. This is only a compiler flag to treat T as its instance.- Returns:
- ObjectPredicate to continue adding rules.
-
that
public ObjectPredicate<T> that(Predicate<T> rule)
- Parameters:
rule- the custom predicate to test against properties of T.- Returns:
- ObjectPredicate to continue adding rules.
-
-