Class DocumentTreeEvent<V>

  • Type Parameters:
    V - tree node value type

    public class DocumentTreeEvent<V>
    extends java.lang.Object
    A document tree modification event.
    • Constructor Detail

      • DocumentTreeEvent

        public DocumentTreeEvent​(DocumentPath path,
                                 DocumentTreeEvent.Type type,
                                 java.util.Optional<Versioned<V>> newValue,
                                 java.util.Optional<Versioned<V>> oldValue)
        Constructs a new DocumentTreeEvent.
        Parameters:
        path - path to the node
        type - type of change
        newValue - optional new value; will be empty if node was deleted
        oldValue - optional old value; will be empty if node was created
      • DocumentTreeEvent

        public DocumentTreeEvent​(DocumentPath path,
                                 java.util.Optional<Versioned<V>> newValue,
                                 java.util.Optional<Versioned<V>> oldValue)
        Constructs a new DocumentTreeEvent.
        Parameters:
        path - path to the node
        newValue - optional new value; will be empty if node was deleted
        oldValue - optional old value; will be empty if node was created
    • Method Detail

      • path

        public DocumentPath path()
        Returns the path to the changed node.
        Returns:
        node path
      • newValue

        public java.util.Optional<Versioned<V>> newValue()
        Returns the new value.
        Returns:
        optional new value; will be empty if node was deleted
      • oldValue

        public java.util.Optional<Versioned<V>> oldValue()
        Returns the old value.
        Returns:
        optional old value; will be empty if node was created
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object