Class VisitorMemento<T>

    • Field Detail

      • typedKey

        protected TypedKey<?> typedKey
      • state

        protected T state
    • Method Detail

      • copy

        public Memento copy()
        Description copied from interface: Memento
        Performs a deep clone of this Memento.
        Returns:
        a deep clone of this Memento
      • restore

        public void restore​(Memento memento)
        Description copied from interface: Memento
        Combines a Memento state with this Memento
        Parameters:
        memento - the Memento restoring this Memento
      • getState

        public T getState()
      • getTypedKey

        public TypedKey<?> getTypedKey()
      • getAnchor

        public String getAnchor()
        Description copied from interface: Memento
        Gets the anchor value of this Memento. Mementos 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 interface Memento
        Overrides:
        getAnchor in class AbstractVisitorMemento
        Returns:
        the ID of this Memento