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 Type
    Method
    Description
    default @NonNull ESuccess
    and(@NonNull ISuccessIndicator aSuccess)
    Logical AND of this success indicator with another one.
    default boolean
     
    boolean
     
    default @NonNull ESuccess
    or(@NonNull ISuccessIndicator aSuccess)
    Logical OR of this success indicator with another one.
  • Method Details

    • isSuccess

      boolean isSuccess()
      Returns:
      true on success and false on failure.
    • isFailure

      default boolean isFailure()
      Returns:
      true on failure and false on success.
    • or

      default @NonNull ESuccess or(@NonNull ISuccessIndicator aSuccess)
      Logical OR of this success indicator with another one.
      Parameters:
      aSuccess - The other success indicator. May not be null.
      Returns:
      ESuccess.SUCCESS if either this or the other indicator is successful.
    • and

      default @NonNull ESuccess and(@NonNull ISuccessIndicator aSuccess)
      Logical AND of this success indicator with another one.
      Parameters:
      aSuccess - The other success indicator. May not be null.
      Returns:
      ESuccess.SUCCESS if both this and the other indicator are successful.