Class AggregateChange<T>
- java.lang.Object
-
- net.officefloor.model.impl.change.AggregateChange<T>
-
-
Constructor Summary
Constructors Constructor Description AggregateChange(T target, java.lang.String changeDescription, Change<?>... changes)
Initiate.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T> Change<T>
aggregate(Change<T> change, Change<?>... changes)
void
apply()
Applies thisChange
.boolean
canApply()
Indicates if can apply thisChange
.java.lang.String
getChangeDescription()
Obtains a description of theChange
.Conflict[]
getConflicts()
T
getTarget()
Obtains the target to which thisChange
applies.void
revert()
Reverts thisChange
(after being applied).
-
-
-
Method Detail
-
getTarget
public T getTarget()
Description copied from interface:Change
Obtains the target to which thisChange
applies.
-
getChangeDescription
public java.lang.String getChangeDescription()
Description copied from interface:Change
Obtains a description of theChange
.- Specified by:
getChangeDescription
in interfaceChange<T>
- Returns:
- Description of the
Change
.
-
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 theChange
can not be applied.- Specified by:
canApply
in interfaceChange<T>
- Returns:
true
if can apply thisChange
.- See Also:
Change.getConflicts()
-
revert
public void revert()
Description copied from interface:Change
Reverts this
Change
(after being applied).This enables do/undo functionality.
-
getConflicts
public Conflict[] getConflicts()
Description copied from interface:Change
Obtains the
Conflict
instances preventing thisChange
from being applied.A
Change
can only be applied if this returns an empty array.- Specified by:
getConflicts
in interfaceChange<T>
- Returns:
- Any
Conflict
instances preventing applying thisChange
.
-
-