Interface TypeSafeRejector<T extends TypeSafeRejector<T,S>,S>


public interface TypeSafeRejector<T extends TypeSafeRejector<T,S>,S>
Author:
Oliver Drotbohm
  • Method Details

    • rejectField

      S rejectField(Function<? super T,?> property, String errorCode)
      Rejects the field referred to by the given Function (ideally a method reference).
      Parameters:
      property - must not be null.
      errorCode - must not be null or empty.
      Returns:
      will never be null.
    • rejectField

      S rejectField(boolean condition, Function<? super T,?> property, String errorCode)
      Rejects the field referred to by the given Function (ideally a method reference).
      Parameters:
      condition - the condition under which to reject the given field.
      property - must not be null.
      errorCode - must not be null or empty.
      Returns:
      will never be null.
    • rejectField

      S rejectField(Predicate<T> condition, Function<? super T,?> property, String errorCode)