Interface IValidityIndicator

All Known Implementing Classes:
EValidity

public interface IValidityIndicator
Very simple interface for an object that has valid/invalid indication.
Author:
Philip Helger
  • Method Summary

    Modifier and Type
    Method
    Description
    default @NonNull EValidity
    and(boolean bValid)
    Logical AND of this validity indicator with a boolean value.
    default @NonNull EValidity
    and(@NonNull IValidityIndicator aValidity)
    Logical AND of this validity indicator with another one.
    default boolean
     
    boolean
     
    default @NonNull EValidity
    or(boolean bValid)
    Logical OR of this validity indicator with a boolean value.
    default @NonNull EValidity
    or(@NonNull IValidityIndicator aValidity)
    Logical OR of this validity indicator with another one.
  • Method Details

    • isValid

      boolean isValid()
      Returns:
      true if valid and false if invalid.
    • isInvalid

      default boolean isInvalid()
      Returns:
      true if invalid and false if valid.
    • or

      default @NonNull EValidity or(@NonNull IValidityIndicator aValidity)
      Logical OR of this validity indicator with another one.
      Parameters:
      aValidity - The other validity indicator. May not be null.
      Returns:
      EValidity.VALID if either this or the other indicator is valid.
    • or

      default @NonNull EValidity or(boolean bValid)
      Logical OR of this validity indicator with a boolean value.
      Parameters:
      bValid - The other validity value.
      Returns:
      EValidity.VALID if either this indicator is valid or the passed value is true.
    • and

      default @NonNull EValidity and(@NonNull IValidityIndicator aValidity)
      Logical AND of this validity indicator with another one.
      Parameters:
      aValidity - The other validity indicator. May not be null.
      Returns:
      EValidity.VALID if both this and the other indicator are valid.
    • and

      default @NonNull EValidity and(boolean bValid)
      Logical AND of this validity indicator with a boolean value.
      Parameters:
      bValid - The other validity value.
      Returns:
      EValidity.VALID if both this indicator is valid and the passed value is true.