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 Type
    Method
    Description
    default @NonNull EChange
    and(boolean bChange)
    Logical AND of this change indicator with a boolean value.
    default @NonNull EChange
    and(@NonNull IChangeIndicator aChange)
    Logical AND of this change indicator with another one.
    boolean
     
    default boolean
     
    default @NonNull EChange
    or(boolean bChange)
    Logical OR of this change indicator with a boolean value.
    default @NonNull EChange
    or(@NonNull IChangeIndicator aChange)
    Logical OR of this change indicator with another one.
  • Method Details

    • isChanged

      boolean isChanged()
      Returns:
      true if changed and false if unchanged.
    • isUnchanged

      default boolean isUnchanged()
      Returns:
      true if unchanged and false if changed.
    • or

      default @NonNull EChange or(@NonNull IChangeIndicator aChange)
      Logical OR of this change indicator with another one.
      Parameters:
      aChange - The other change indicator. May not be null.
      Returns:
      EChange.CHANGED if either this or the other indicator is changed.
    • or

      default @NonNull EChange or(boolean bChange)
      Logical OR of this change indicator with a boolean value.
      Parameters:
      bChange - The other change value.
      Returns:
      EChange.CHANGED if either this indicator is changed or the passed value is true.
    • and

      default @NonNull EChange and(@NonNull IChangeIndicator aChange)
      Logical AND of this change indicator with another one.
      Parameters:
      aChange - The other change indicator. May not be null.
      Returns:
      EChange.CHANGED if both this and the other indicator are changed.
    • and

      default @NonNull EChange and(boolean bChange)
      Logical AND of this change indicator with a boolean value.
      Parameters:
      bChange - The other change value.
      Returns:
      EChange.CHANGED if both this indicator is changed and the passed value is true.