Class ObjectPredicate<T>

    • Constructor Detail

      • ObjectPredicate

        protected ObjectPredicate​(Predicate<T> predicate)
    • Method Detail

      • isA

        public static <T> PredicateAppender<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:
        GenericPredicateRule to continue adding rules.
      • isAn

        public static <T> PredicateAppender<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:
        GenericPredicateRule to continue adding rules.
      • isEqualTo

        public static <T> Predicate<T> isEqualTo​(T value)
        Check if the actual value is equal to the given one.
        Type Parameters:
        T - the value which you wish to test against the original value.
        Parameters:
        value - the exact expected value.
        Returns:
        Predicate to continue adding rules.
      • test

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