Package com.helger.base.state
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 TypeMethodDescriptiondefault @NonNull EEnabledand(@NonNull IEnabledIndicator aEnabled) Logical AND of this enabled indicator with another one.default booleanbooleandefault @NonNull EEnabledor(@NonNull IEnabledIndicator aEnabled) Logical OR of this enabled indicator with another one.
-
Method Details
-
isEnabled
boolean isEnabled()- Returns:
trueif the object is currently enabled,falseotherwise.
-
isDisabled
default boolean isDisabled()- Returns:
trueif the object is currently disabled,falseotherwise.
-
or
Logical OR of this enabled indicator with another one.- Parameters:
aEnabled- The other enabled indicator. May not benull.- Returns:
EEnabled.ENABLEDif either this or the other indicator is enabled.
-
and
Logical AND of this enabled indicator with another one.- Parameters:
aEnabled- The other enabled indicator. May not benull.- Returns:
EEnabled.ENABLEDif both this and the other indicator are enabled.
-