Add ObservableChangeManager interface with wrapper implementation
All checks were successful
zdm/undo-redo/pipeline/head This commit looks good
All checks were successful
zdm/undo-redo/pipeline/head This commit looks good
This commit is contained in:
@ -26,7 +26,7 @@ public interface ChangeManager<C extends Change> {
|
||||
* @return the change that was applied last
|
||||
* @since 0.0.1
|
||||
*/
|
||||
Optional<Change> getLastChange();
|
||||
Optional<C> getLastChange();
|
||||
|
||||
/**
|
||||
* Undoes the current change.
|
||||
|
@ -23,7 +23,7 @@ public final class UnlimitedChangeManager<C extends Change> implements ChangeMan
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<Change> getLastChange() {
|
||||
public Optional<C> getLastChange() {
|
||||
return index == -1 ? Optional.empty() : Optional.of(changes.get(index));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user