Package org.smooks.engine.memento
Class VisitorMemento<T>
- java.lang.Object
-
- org.smooks.engine.memento.AbstractVisitorMemento
-
- org.smooks.engine.memento.VisitorMemento<T>
-
- All Implemented Interfaces:
Memento
- Direct Known Subclasses:
SimpleVisitorMemento
public class VisitorMemento<T> extends AbstractVisitorMemento
-
-
Constructor Summary
Constructors Constructor Description VisitorMemento(Fragment<?> fragment, Visitor visitor, TypedKey<?> typedKey)
VisitorMemento(Fragment<?> fragment, Visitor visitor, TypedKey<?> typedKey, T state)
-
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
.T
getState()
TypedKey<?>
getTypedKey()
void
restore(Memento memento)
Combines aMemento
state with thisMemento
-
Methods inherited from class org.smooks.engine.memento.AbstractVisitorMemento
getFragment, getVisitor
-
-
-
-
Method Detail
-
copy
public Memento copy()
Description copied from interface:Memento
Performs a deep clone of thisMemento
.- Returns:
- a deep clone of this
Memento
-
restore
public void restore(Memento memento)
Description copied from interface:Memento
Combines aMemento
state with thisMemento
- Parameters:
memento
- theMemento
restoring thisMemento
-
getState
public T getState()
-
getTypedKey
public TypedKey<?> getTypedKey()
-
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 classAbstractVisitorMemento
- Returns:
- the ID of this
Memento
-
-