Package com.helger.base.state
Interface IChangeIndicator
- All Known Implementing Classes:
ChangeWithValue,EChange
public interface IChangeIndicator
Very simple interface for an object that has changed/unchanged indication.
- Author:
- Philip Helger
-
Method Summary
Modifier and TypeMethodDescriptiondefault @NonNull EChangeand(boolean bChange) Logical AND of this change indicator with a boolean value.default @NonNull EChangeand(@NonNull IChangeIndicator aChange) Logical AND of this change indicator with another one.booleandefault booleandefault @NonNull EChangeor(boolean bChange) Logical OR of this change indicator with a boolean value.default @NonNull EChangeor(@NonNull IChangeIndicator aChange) Logical OR of this change indicator with another one.
-
Method Details
-
isChanged
boolean isChanged()- Returns:
trueif changed andfalseif unchanged.
-
isUnchanged
default boolean isUnchanged()- Returns:
trueif unchanged andfalseif changed.
-
or
Logical OR of this change indicator with another one.- Parameters:
aChange- The other change indicator. May not benull.- Returns:
EChange.CHANGEDif either this or the other indicator is changed.
-
or
Logical OR of this change indicator with a boolean value.- Parameters:
bChange- The other change value.- Returns:
EChange.CHANGEDif either this indicator is changed or the passed value istrue.
-
and
Logical AND of this change indicator with another one.- Parameters:
aChange- The other change indicator. May not benull.- Returns:
EChange.CHANGEDif both this and the other indicator are changed.
-
and
Logical AND of this change indicator with a boolean value.- Parameters:
bChange- The other change value.- Returns:
EChange.CHANGEDif both this indicator is changed and the passed value istrue.
-