public class CompoundEdit extends Object implements Edit<Object>
Constructor and Description |
---|
CompoundEdit()
Create a new compound edit with no existing Edit objects.
|
CompoundEdit(List<Edit<?>> edits)
Create a new compound edit with the specified edits as children.
|
Modifier and Type | Method and Description |
---|---|
Object |
doEdit()
Attempts to call the doEdit method of all child edits.
|
List<Edit<?>> |
getChildEdits() |
Object |
getSubject()
There is no explicit subject for a compound edit, so this method always
returns null.
|
boolean |
isApplied()
Has the edit been applied yet?
|
void |
undo()
Rolls back all child edits in reverse order
|
public CompoundEdit()
public Object doEdit() throws EditException
doEdit
in interface Edit<Object>
EditException
- if the edit fails. If an edit throws EditException it should
try to ensure the subject is unaltered. Where this is
impossible consider breaking edits down into a compound edit.public Object getSubject()
getSubject
in interface Edit<Object>
public void undo()
Copyright © 2015–2016 The Apache Software Foundation. All rights reserved.