Interface IEnabledIndicator

All Known Implementing Classes:
ConditionalLogger, EEnabled

public interface IEnabledIndicator
Simple interface for all objects that can be enabled and disabled.
Author:
Philip Helger
  • Method Summary

    Modifier and Type
    Method
    Description
    default @NonNull EEnabled
    and(@NonNull IEnabledIndicator aEnabled)
    Logical AND of this enabled indicator with another one.
    default boolean
     
    boolean
     
    default @NonNull EEnabled
    or(@NonNull IEnabledIndicator aEnabled)
    Logical OR of this enabled indicator with another one.
  • Method Details

    • isEnabled

      boolean isEnabled()
      Returns:
      true if the object is currently enabled, false otherwise.
    • isDisabled

      default boolean isDisabled()
      Returns:
      true if the object is currently disabled, false otherwise.
    • or

      default @NonNull EEnabled or(@NonNull IEnabledIndicator aEnabled)
      Logical OR of this enabled indicator with another one.
      Parameters:
      aEnabled - The other enabled indicator. May not be null.
      Returns:
      EEnabled.ENABLED if either this or the other indicator is enabled.
    • and

      default @NonNull EEnabled and(@NonNull IEnabledIndicator aEnabled)
      Logical AND of this enabled indicator with another one.
      Parameters:
      aEnabled - The other enabled indicator. May not be null.
      Returns:
      EEnabled.ENABLED if both this and the other indicator are enabled.