Class AbstractDocumentNodeState

    • Constructor Detail

      • AbstractDocumentNodeState

        public AbstractDocumentNodeState()
    • Method Detail

      • getPath

        public abstract Path getPath()
      • isFromExternalChange

        public abstract boolean isFromExternalChange()
      • withRootRevision

        public abstract AbstractDocumentNodeState withRootRevision​(@NotNull
                                                                   @NotNull RevisionVector root,
                                                                   boolean externalChange)
        Creates a copy of this DocumentNodeState with the getRootRevision() set to the given root revision. This method returns this instance if the given root revision is the same as the one in this instance and the isFromExternalChange() flags are equal.
        Parameters:
        root - the root revision for the copy of this node state.
        externalChange - if the isFromExternalChange() flag must be set on the returned node state.
        Returns:
        a copy of this node state with the given root revision and external change flag.
      • hasNoChildren

        public abstract boolean hasNoChildren()
      • getNodeStateDiffer

        protected abstract NodeStateDiffer getNodeStateDiffer()
      • equals

        public boolean equals​(java.lang.Object that)
        Description copied from class: AbstractNodeState
        Checks whether the given object is equal to this one. Two node states are considered equal if all their properties and child nodes match, regardless of ordering. Subclasses may override this method with a more efficient equality check if one is available.
        Overrides:
        equals in class AbstractNodeState
        Parameters:
        that - target of the comparison
        Returns:
        true if the objects are equal, false otherwise
      • compareAgainstBaseState

        public boolean compareAgainstBaseState​(NodeState base,
                                               NodeStateDiff diff)
        Description copied from class: AbstractNodeState
        Generic default comparison algorithm that simply walks through the property and child node lists of the given base state and compares the entries one by one with corresponding ones (if any) in this state.
        Specified by:
        compareAgainstBaseState in interface NodeState
        Overrides:
        compareAgainstBaseState in class AbstractNodeState
        Parameters:
        base - base state
        diff - handler of node state differences
        Returns:
        true if the full diff was performed, or false if it was aborted as requested by the handler (see the NodeStateDiff contract for more details)