Class ObjectPredicate<T>

    • 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.
      • test

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