Package net.officefloor.model.change
Interface Change<T>
-
- All Known Subinterfaces:
ChangeList<T>
- All Known Implementing Classes:
AbstractChange,AggregateChange,DisconnectChange,NoChange
public interface Change<T>A change to be applied/reverted.
All operations utilise this to enable do/undo functionality.
- Author:
- Daniel Sagenschneider
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidapply()Applies thisChange.booleancanApply()Indicates if can apply thisChange.java.lang.StringgetChangeDescription()Obtains a description of theChange.Conflict[]getConflicts()TgetTarget()Obtains the target to which thisChangeapplies.voidrevert()Reverts thisChange(after being applied).
-
-
-
Method Detail
-
getTarget
T getTarget()
Obtains the target to which thisChangeapplies.- Returns:
- Target to which this
Changeapplies.
-
getChangeDescription
java.lang.String getChangeDescription()
Obtains a description of theChange.- Returns:
- Description of the
Change.
-
canApply
boolean canApply()
Indicates if can apply this
Change.Typically there will be
Conflictinstances providing detail on why theChangecan not be applied.- Returns:
trueif can apply thisChange.- See Also:
getConflicts()
-
apply
void apply()
Applies thisChange.
-
revert
void revert()
Reverts this
Change(after being applied).This enables do/undo functionality.
-
-