Package com.helger.base.state
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 TypeMethodDescriptiondefault @NonNull EValidityand(boolean bValid) Logical AND of this validity indicator with a boolean value.default @NonNull EValidityand(@NonNull IValidityIndicator aValidity) Logical AND of this validity indicator with another one.default booleanbooleanisValid()default @NonNull EValidityor(boolean bValid) Logical OR of this validity indicator with a boolean value.default @NonNull EValidityor(@NonNull IValidityIndicator aValidity) Logical OR of this validity indicator with another one.
-
Method Details
-
isValid
boolean isValid()- Returns:
trueif valid andfalseif invalid.
-
isInvalid
default boolean isInvalid()- Returns:
trueif invalid andfalseif valid.
-
or
Logical OR of this validity indicator with another one.- Parameters:
aValidity- The other validity indicator. May not benull.- Returns:
EValidity.VALIDif either this or the other indicator is valid.
-
or
Logical OR of this validity indicator with a boolean value.- Parameters:
bValid- The other validity value.- Returns:
EValidity.VALIDif either this indicator is valid or the passed value istrue.
-
and
Logical AND of this validity indicator with another one.- Parameters:
aValidity- The other validity indicator. May not benull.- Returns:
EValidity.VALIDif both this and the other indicator are valid.
-
and
Logical AND of this validity indicator with a boolean value.- Parameters:
bValid- The other validity value.- Returns:
EValidity.VALIDif both this indicator is valid and the passed value istrue.
-