Modifier and Type | Field and Description |
---|---|
java.util.List<ComparedElement> |
children |
NodeTreeRep |
leftRep |
NodeTreeRep |
rightRep |
STATE_DELETED, STATE_NEW, STATE_UNCHANGED, STATE_UPDATED
Constructor and Description |
---|
ComparedElement(NodeTreeRep leftRep,
NodeTreeRep rightRep)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addChild(ComparedElement child)
Add a child element for this element.
|
java.util.List<ComparedElement> |
getChildren()
Return the children of the element.
|
org.mdiutil.xml.tree.XMLNode |
getLeftNode()
Return the associated left node (can be null) if there is no left node for this element).
|
NodeTreeRep |
getLeftNodeTreeRep()
Return the left node wrapper.
|
char |
getMovedState()
Return the moved state of this element.
|
XMLNodeKey |
getNodeKey()
Return the key of the node.
|
java.lang.String |
getNodeName()
Return the node name for the element.
|
NodeTreeRep |
getNodeTreeRep(boolean isLeftTree)
Return the node wrapper for the left or right tree.
|
org.mdiutil.xml.tree.XMLNode |
getRightNode()
Return the associated right node (can be null) if there is no right node for this element).
|
NodeTreeRep |
getRightNodeTreeRep()
Return the right node wrapper.
|
char |
getState()
Return the state of this element.
|
boolean |
hasChildren()
Return true if the element has children.
|
boolean |
hasDifferentChildren()
Return true if the element has children which are different beteween left and right.
|
boolean |
hasLeftChildren()
Return true if there is a left node and this node has children.
|
boolean |
hasRightChildren()
Return true if there is a right node and this node has children.
|
void |
setHasDifferentChildren(boolean hasDifferentChildren)
Set if the element has children which are different beteween left and right.
|
void |
setLeftNodeTreeRep(NodeTreeRep leftRep)
Set the left node wrapper.
|
void |
setMovedState(char state)
Set the moved state of this element.
|
void |
setParentElement(ComparedElement parentElement)
Set the parent element.
|
void |
setRightNodeTreeRep(NodeTreeRep rightRep)
Set the right node wrapper.
|
void |
setState(char state)
Set the state of this element.
|
java.lang.String |
toString() |
public NodeTreeRep leftRep
public NodeTreeRep rightRep
public final java.util.List<ComparedElement> children
public ComparedElement(NodeTreeRep leftRep, NodeTreeRep rightRep)
leftRep
- the left node wrapperrightRep
- the right node wrapperpublic final void setLeftNodeTreeRep(NodeTreeRep leftRep)
leftRep
- the left node wrapperpublic final void setRightNodeTreeRep(NodeTreeRep rightRep)
rightRep
- the right node wrapperpublic NodeTreeRep getNodeTreeRep(boolean isLeftTree)
isLeftTree
- true for the left treepublic NodeTreeRep getLeftNodeTreeRep()
public NodeTreeRep getRightNodeTreeRep()
public void setParentElement(ComparedElement parentElement)
parentElement
- the parent elementpublic void setHasDifferentChildren(boolean hasDifferentChildren)
hasDifferentChildren
- true if the element has children which are differentpublic java.lang.String getNodeName()
public boolean hasDifferentChildren()
public XMLNodeKey getNodeKey()
public java.lang.String toString()
toString
in class java.lang.Object
public org.mdiutil.xml.tree.XMLNode getLeftNode()
public boolean hasLeftChildren()
public boolean hasRightChildren()
public org.mdiutil.xml.tree.XMLNode getRightNode()
public void setState(char state)
state
- the stateNodeState
public char getState()
NodeState
public void setMovedState(char state)
state
- the moved stateNodeMoveState
public char getMovedState()
NodeMoveState
public void addChild(ComparedElement child)
child
- the child elementpublic java.util.List<ComparedElement> getChildren()
public boolean hasChildren()
Copyright © 2024 HervĂ© Girod. All Rights Reserved. Documentation and source under the BSD licence