Package com.helger.base.state
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 TypeMethodDescriptiondefault @NonNull EMandatoryand(@NonNull IMandatoryIndicator aMandatory) Logical AND of this mandatory indicator with another one.booleandefault booleandefault @NonNull EMandatoryor(@NonNull IMandatoryIndicator aMandatory) Logical OR of this mandatory indicator with another one.
-
Method Details
-
isMandatory
boolean isMandatory()- Returns:
trueif mandatory andfalseif not mandatory.
-
isOptional
default boolean isOptional()- Returns:
trueif optional andfalseif not optional.
-
or
Logical OR of this mandatory indicator with another one.- Parameters:
aMandatory- The other mandatory indicator. May not benull.- Returns:
EMandatory.MANDATORYif either this or the other indicator is mandatory.
-
and
Logical AND of this mandatory indicator with another one.- Parameters:
aMandatory- The other mandatory indicator. May not benull.- Returns:
EMandatory.MANDATORYif both this and the other indicator are mandatory.
-