Class NoChange<T>

java.lang.Object
net.officefloor.model.impl.change.AbstractChange<T>
net.officefloor.model.impl.change.NoChange<T>
All Implemented Interfaces:
Change<T>

public class NoChange<T> extends AbstractChange<T>
Change that does nothing.
Author:
Daniel Sagenschneider
  • Constructor Details

    • NoChange

      public NoChange(T target, String changeDescription, Conflict... conflicts)
      Initiate.
      Parameters:
      target - Target of the Change.
      changeDescription - Description of the Change.
      conflicts - Conflict instances.
    • NoChange

      public NoChange(T target, String changeDescription, String... conflictDescriptions)
      Initiate.
      Parameters:
      target - Target of the Change.
      changeDescription - Description of the Change.
      conflictDescriptions - Descriptions for any Conflict instances added to this Change.
  • Method Details

    • canApply

      public boolean canApply()
      Description copied from interface: Change

      Indicates if can apply this Change.

      Typically there will be Conflict instances providing detail on why the Change can not be applied.

      Specified by:
      canApply in interface Change<T>
      Overrides:
      canApply in class AbstractChange<T>
      Returns:
      true if can apply this Change.
      See Also:
    • apply

      public void apply()
      Description copied from interface: Change
      Applies this Change.
    • revert

      public void revert()
      Description copied from interface: Change

      Reverts this Change (after being applied).

      This enables do/undo functionality.