Class ObjectPredicateBuilder<T>

    • Method Detail

      • isNotNull

        public static <T> Predicate<T> isNotNull()
        Checks whether the actual value is present.
        Type Parameters:
        T - the type upon which the validations are tested.
        Returns:
        Predicate to continue adding rules.
      • isA

        public static <T> GenericPredicate<T> isA​(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.
      • isAn

        public static <T> GenericPredicate<T> isAn​(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.
      • test

        public boolean test​(T value)
        Specified by:
        test in interface Predicate<T>
      • where

        public Predicate<T> where​(Predicate<T> rule)
        Specified by:
        where in interface GenericPredicate<T>
        Parameters:
        rule - the custom predicate to test against properties of T.
        Returns:
        ObjectPredicate to continue adding rules.