Package com.helger.base.state
Interface ISuccessIndicator
- All Known Implementing Classes:
ESuccess,SuccessWithValue
public interface ISuccessIndicator
Very simple interface for an object that has success/failure indication.
- Author:
- Philip Helger
-
Method Summary
Modifier and TypeMethodDescriptiondefault @NonNull ESuccessand(@NonNull ISuccessIndicator aSuccess) Logical AND of this success indicator with another one.default booleanbooleandefault @NonNull ESuccessor(@NonNull ISuccessIndicator aSuccess) Logical OR of this success indicator with another one.
-
Method Details
-
isSuccess
boolean isSuccess()- Returns:
trueon success andfalseon failure.
-
isFailure
default boolean isFailure()- Returns:
trueon failure andfalseon success.
-
or
Logical OR of this success indicator with another one.- Parameters:
aSuccess- The other success indicator. May not benull.- Returns:
ESuccess.SUCCESSif either this or the other indicator is successful.
-
and
Logical AND of this success indicator with another one.- Parameters:
aSuccess- The other success indicator. May not benull.- Returns:
ESuccess.SUCCESSif both this and the other indicator are successful.
-