Interface IMandatoryIndicator

All Known Implementing Classes:
EMandatory

public interface IMandatoryIndicator
Very simple interface for an object that has mandatory/optional indication.
Author:
Philip Helger
  • Method Summary

    Modifier and Type
    Method
    Description
    default @NonNull EMandatory
    and(@NonNull IMandatoryIndicator aMandatory)
    Logical AND of this mandatory indicator with another one.
    boolean
     
    default boolean
     
    default @NonNull EMandatory
    or(@NonNull IMandatoryIndicator aMandatory)
    Logical OR of this mandatory indicator with another one.
  • Method Details

    • isMandatory

      boolean isMandatory()
      Returns:
      true if mandatory and false if not mandatory.
    • isOptional

      default boolean isOptional()
      Returns:
      true if optional and false if not optional.
    • or

      default @NonNull EMandatory or(@NonNull IMandatoryIndicator aMandatory)
      Logical OR of this mandatory indicator with another one.
      Parameters:
      aMandatory - The other mandatory indicator. May not be null.
      Returns:
      EMandatory.MANDATORY if either this or the other indicator is mandatory.
    • and

      default @NonNull EMandatory and(@NonNull IMandatoryIndicator aMandatory)
      Logical AND of this mandatory indicator with another one.
      Parameters:
      aMandatory - The other mandatory indicator. May not be null.
      Returns:
      EMandatory.MANDATORY if both this and the other indicator are mandatory.