Package org.solidcoding.validation
Interface ReturningValidator<R>
-
- All Known Implementing Classes:
EndingValidator
public interface ReturningValidator<R>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RorElseReturn(R other)<E extends RuntimeException>
RorElseThrow(E throwable)
-
-
-
Method Detail
-
orElseThrow
<E extends RuntimeException> R orElseThrow(E throwable)
- Type Parameters:
E- the bound of the Exception that needs to be thrown when a rule is broken.- Parameters:
throwable- the Exception that needs to be thrown when a rule is broken.- Returns:
- R the return type
-
-