| Modifier | Constructor and Description |
|---|---|
protected |
DefaultTree(QueryNode rootQueryNode) |
| Modifier and Type | Method and Description |
|---|---|
void |
addChild(QueryNode parentQueryNode,
QueryNode childQueryNode,
Optional<BinaryOrderedOperatorNode.ArgumentPosition> optionalPosition,
boolean mustBeNew,
boolean canReplace) |
boolean |
contains(QueryNode node) |
QueryTree |
createSnapshot()
Keeps the same query node objects but clones the tree edges
(since the latter are mutable by default).
|
com.google.common.collect.ImmutableList<QueryNode> |
getChildren(QueryNode node) |
Stream<QueryNode> |
getChildrenStream(QueryNode node) |
com.google.common.collect.ImmutableSet<IntensionalDataNode> |
getIntensionalNodes() |
com.google.common.collect.ImmutableList<QueryNode> |
getNodesInBottomUpOrder() |
com.google.common.collect.ImmutableList<QueryNode> |
getNodesInTopDownOrder() |
Optional<BinaryOrderedOperatorNode.ArgumentPosition> |
getOptionalPosition(QueryNode parentNode,
QueryNode childNode) |
Optional<QueryNode> |
getParent(QueryNode childQueryNode) |
QueryNode |
getRootNode() |
com.google.common.collect.ImmutableList<QueryNode> |
getSubTreeNodesInTopDownOrder(QueryNode currentQueryNode)
Excludes the top node from the list
|
com.google.common.collect.ImmutableSet<TrueNode> |
getTrueNodes() |
UUID |
getVersionNumber() |
void |
insertParent(QueryNode childNode,
QueryNode newParentNode,
Optional<BinaryOrderedOperatorNode.ArgumentPosition> optionalPosition) |
QueryNode |
removeOrReplaceNodeByUniqueChild(QueryNode parentQueryNode) |
void |
removeSubTree(QueryNode subQueryTreeRoot) |
void |
replaceNode(QueryNode previousNode,
QueryNode replacingNode) |
QueryNode |
replaceNodeByChild(QueryNode parentNode,
Optional<BinaryOrderedOperatorNode.ArgumentPosition> optionalReplacingChildPosition) |
void |
replaceNodesByOneNode(com.google.common.collect.ImmutableList<QueryNode> nodesToRemove,
QueryNode replacingNode,
QueryNode parentNode,
Optional<BinaryOrderedOperatorNode.ArgumentPosition> optionalPosition) |
void |
transferChild(QueryNode childNode,
QueryNode formerParentNode,
QueryNode newParentNode,
Optional<BinaryOrderedOperatorNode.ArgumentPosition> optionalPosition) |
protected DefaultTree(QueryNode rootQueryNode)
public QueryNode getRootNode()
getRootNode in interface QueryTreepublic void addChild(QueryNode parentQueryNode, QueryNode childQueryNode, Optional<BinaryOrderedOperatorNode.ArgumentPosition> optionalPosition, boolean mustBeNew, boolean canReplace) throws IllegalTreeUpdateException
addChild in interface QueryTreeIllegalTreeUpdateExceptionpublic com.google.common.collect.ImmutableList<QueryNode> getChildren(QueryNode node)
getChildren in interface QueryTreepublic Stream<QueryNode> getChildrenStream(QueryNode node)
getChildrenStream in interface QueryTreepublic com.google.common.collect.ImmutableList<QueryNode> getNodesInBottomUpOrder()
getNodesInBottomUpOrder in interface QueryTreepublic com.google.common.collect.ImmutableList<QueryNode> getNodesInTopDownOrder()
getNodesInTopDownOrder in interface QueryTreepublic void replaceNode(QueryNode previousNode, QueryNode replacingNode)
replaceNode in interface QueryTreepublic void removeSubTree(QueryNode subQueryTreeRoot)
removeSubTree in interface QueryTreepublic com.google.common.collect.ImmutableList<QueryNode> getSubTreeNodesInTopDownOrder(QueryNode currentQueryNode)
QueryTreegetSubTreeNodesInTopDownOrder in interface QueryTreepublic QueryNode removeOrReplaceNodeByUniqueChild(QueryNode parentQueryNode) throws IllegalTreeUpdateException
removeOrReplaceNodeByUniqueChild in interface QueryTreeIllegalTreeUpdateExceptionpublic void replaceNodesByOneNode(com.google.common.collect.ImmutableList<QueryNode> nodesToRemove, QueryNode replacingNode, QueryNode parentNode, Optional<BinaryOrderedOperatorNode.ArgumentPosition> optionalPosition) throws IllegalTreeUpdateException
replaceNodesByOneNode in interface QueryTreeIllegalTreeUpdateExceptionpublic Optional<BinaryOrderedOperatorNode.ArgumentPosition> getOptionalPosition(QueryNode parentNode, QueryNode childNode)
getOptionalPosition in interface QueryTreepublic void insertParent(QueryNode childNode, QueryNode newParentNode, Optional<BinaryOrderedOperatorNode.ArgumentPosition> optionalPosition) throws IllegalTreeUpdateException
insertParent in interface QueryTreeIllegalTreeUpdateExceptionpublic com.google.common.collect.ImmutableSet<TrueNode> getTrueNodes()
getTrueNodes in interface QueryTreepublic com.google.common.collect.ImmutableSet<IntensionalDataNode> getIntensionalNodes()
getIntensionalNodes in interface QueryTreepublic QueryNode replaceNodeByChild(QueryNode parentNode, Optional<BinaryOrderedOperatorNode.ArgumentPosition> optionalReplacingChildPosition)
replaceNodeByChild in interface QueryTreepublic QueryTree createSnapshot()
QueryTreecreateSnapshot in interface QueryTreepublic void transferChild(QueryNode childNode, QueryNode formerParentNode, QueryNode newParentNode, Optional<BinaryOrderedOperatorNode.ArgumentPosition> optionalPosition)
transferChild in interface QueryTreepublic UUID getVersionNumber()
getVersionNumber in interface QueryTreeCopyright © 2009–2020 Free University of Bozen-Bolzano. All rights reserved.