|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.levigo.util.base.CompositeMemento
public class CompositeMemento
A composite memento that encompasses a collection or an array of MementoOriginator
s.
Constructor Summary | |
---|---|
CompositeMemento(Collection<? extends MementoOriginator> originators)
Create a composite memento for all given originators. |
|
CompositeMemento(Collection<? extends MementoOriginator> originators,
boolean saveImmediately)
Create a composite memento for all given originators. |
Method Summary | |
---|---|
void |
clear()
Clear this memento so that restore() ing will have no effect. |
void |
restore()
Restore this memento's originator to its state at the time when this memento was created. |
void |
save()
Update this memento's state with the current state of the originators given at construction time. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CompositeMemento(Collection<? extends MementoOriginator> originators)
restore()
on this composite memento will restore
all mementos provided by the those originators.
originators
- the memento originatorspublic CompositeMemento(Collection<? extends MementoOriginator> originators, boolean saveImmediately)
restore()
on this
composite memento will restore all mementos provided by the those originators. If
saveImmediately
is true
, mementos will be requested immediately for
all member originators. Otherwise they can be requested later on using save()
.
originators
- the memento originatorssaveImmediately
- whether to save the member mementos immediatelyMethod Detail |
---|
public void save()
public void clear()
restore()
ing will have no effect.
public void restore()
Memento
restore
in interface Memento
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |