public abstract class AbstractDocumentNodeState extends AbstractNodeState
Constructor and Description |
---|
AbstractDocumentNodeState() |
Modifier and Type | Method and Description |
---|---|
boolean |
compareAgainstBaseState(NodeState base,
NodeStateDiff diff)
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.
|
boolean |
equals(java.lang.Object that)
Checks whether the given object is equal to this one.
|
abstract RevisionVector |
getLastRevision() |
protected abstract NodeStateDiffer |
getNodeStateDiffer() |
abstract Path |
getPath() |
abstract RevisionVector |
getRootRevision() |
abstract boolean |
hasNoChildren() |
abstract boolean |
isFromExternalChange() |
abstract AbstractDocumentNodeState |
withRootRevision(@NotNull RevisionVector root,
boolean externalChange)
|
checkValidName, compareAgainstBaseState, comparePropertiesAgainstBaseState, count, equals, getBoolean, getBoolean, getChildNodeCount, getChildNodeNames, getLong, getLong, getName, getName, getNames, getNames, getProperty, getPropertyCount, getString, getString, getStrings, getStrings, hashCode, hasProperty, isValidName, toString, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
builder, exists, getChildNode, getChildNodeEntries, getProperties, hasChildNode
public abstract Path getPath()
public abstract RevisionVector getLastRevision()
public abstract RevisionVector getRootRevision()
public abstract boolean isFromExternalChange()
public abstract AbstractDocumentNodeState withRootRevision(@NotNull @NotNull RevisionVector root, boolean externalChange)
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.root
- the root revision for the copy of this node state.externalChange
- if the isFromExternalChange()
flag must be
set on the returned node state.public abstract boolean hasNoChildren()
protected abstract NodeStateDiffer getNodeStateDiffer()
public boolean equals(java.lang.Object that)
AbstractNodeState
equals
in class AbstractNodeState
that
- target of the comparisontrue
if the objects are equal,
false
otherwisepublic boolean compareAgainstBaseState(NodeState base, NodeStateDiff diff)
AbstractNodeState
compareAgainstBaseState
in interface NodeState
compareAgainstBaseState
in class AbstractNodeState
base
- base statediff
- handler of node state differencestrue
if the full diff was performed, or
false
if it was aborted as requested by the handler
(see the NodeStateDiff
contract for more details)Copyright © 2012–2022 The Apache Software Foundation. All rights reserved.