Package org.smooks.engine.memento
Class TextAccumulatorVisitorMemento
- java.lang.Object
-
- org.smooks.engine.memento.TextAccumulatorMemento
-
- org.smooks.engine.memento.TextAccumulatorVisitorMemento
-
- All Implemented Interfaces:
Memento
public class TextAccumulatorVisitorMemento extends TextAccumulatorMemento
-
-
Field Summary
-
Fields inherited from class org.smooks.engine.memento.TextAccumulatorMemento
anchor, fragment, stringBuilder
-
-
Constructor Summary
Constructors Constructor Description TextAccumulatorVisitorMemento(Fragment<?> fragment, Visitor visitor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Memento
copy()
Performs a deep clone of thisMemento
.String
getAnchor()
Gets the anchor value of thisMemento
.void
restore(Memento memento)
Combines aMemento
state with thisMemento
-
Methods inherited from class org.smooks.engine.memento.TextAccumulatorMemento
accumulateText, getFragment, getText
-
-
-
-
Method Detail
-
copy
public Memento copy()
Description copied from interface:Memento
Performs a deep clone of thisMemento
.- Specified by:
copy
in interfaceMemento
- Overrides:
copy
in classTextAccumulatorMemento
- Returns:
- a deep clone of this
Memento
-
restore
public void restore(Memento memento)
Description copied from interface:Memento
Combines aMemento
state with thisMemento
- Specified by:
restore
in interfaceMemento
- Overrides:
restore
in classTextAccumulatorMemento
- Parameters:
memento
- theMemento
restoring thisMemento
-
getAnchor
public String getAnchor()
Description copied from interface:Memento
Gets the anchor value of thisMemento
.Memento
s with equal anchor values are considered to be capturing the state of the same object but at different points in time.- Specified by:
getAnchor
in interfaceMemento
- Overrides:
getAnchor
in classTextAccumulatorMemento
- Returns:
- the ID of this
Memento
-
-