Class AbstractChange<T>
java.lang.Object
net.officefloor.model.impl.change.AbstractChange<T>
- All Implemented Interfaces:
Change<T>
- Direct Known Subclasses:
DisconnectChange,NoChange
Abstract
Change.- Author:
- Daniel Sagenschneider
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractChange(T target, String changeDescription) Initiate.AbstractChange(T target, String changeDescription, Conflict[] conflicts) Initiate. -
Method Summary
-
Constructor Details
-
AbstractChange
Initiate. -
AbstractChange
Initiate.
-
-
Method Details
-
setConflicts
Specifies theConflictinstances.- Parameters:
conflicts-Conflictinstances.
-
getTarget
Description copied from interface:ChangeObtains the target to which thisChangeapplies. -
getChangeDescription
Description copied from interface:ChangeObtains a description of theChange.- Specified by:
getChangeDescriptionin interfaceChange<T>- Returns:
- Description of the
Change.
-
canApply
public boolean canApply()Description copied from interface:ChangeIndicates if can apply this
Change.Typically there will be
Conflictinstances providing detail on why theChangecan not be applied. -
getConflicts
Description copied from interface:ChangeObtains the
Conflictinstances preventing thisChangefrom being applied.A
Changecan only be applied if this returns an empty array.- Specified by:
getConflictsin interfaceChange<T>- Returns:
- Any
Conflictinstances preventing applying thisChange.
-