public class BranchNode extends AbstractExprNode
Modifier and Type | Field and Description |
---|---|
protected List<ExprNode> |
children
child node list for this branch node
|
annotations, assertionType
Modifier | Constructor and Description |
---|---|
protected |
BranchNode(AssertionType assertionType)
Creates a BranchNode using a logical operator.
|
protected |
BranchNode(AssertionType assertionType,
ExprNode... childList)
Creates a BranchNode using a logical operator and a list of children.
|
protected |
BranchNode(AssertionType assertionType,
List<ExprNode> childList)
Creates a BranchNode using a logical operator and a list of children.
|
Modifier and Type | Method and Description |
---|---|
Object |
accept(FilterVisitor visitor)
Element/node accept method for visitor pattern.
|
void |
addNode(ExprNode node)
Adds a child node to this branch node node
|
void |
addNodeToHead(ExprNode node)
Adds a child node to this branch node at the head rather than the tail.
|
ExprNode |
clone()
Makes a full clone in new memory space of the current node and children
|
boolean |
equals(Object other) |
List<ExprNode> |
getChildren()
Gets the children below this BranchNode.
|
ExprNode |
getFirstChild()
Convenience method that gets the first child in the children array.
|
int |
hashCode()
(non-Javadoc)
|
boolean |
isLeaf()
Tests to see if this node is a leaf or branch node.
|
void |
setChildren(List<ExprNode> list)
Sets the list of children under this node.
|
escapeFilterValue, get, getAnnotations, getAssertionType, printRefinementToBuffer, set, toString
protected BranchNode(AssertionType assertionType, List<ExprNode> childList)
assertionType
- the node's typechildList
- the child nodes under this branch node.protected BranchNode(AssertionType assertionType, ExprNode... childList)
assertionType
- the node's typechildList
- the child nodes under this branch node.protected BranchNode(AssertionType assertionType)
assertionType
- the node's typepublic final boolean isLeaf()
AbstractExprNode
isLeaf
in interface ExprNode
isLeaf
in class AbstractExprNode
ExprNode.isLeaf()
public ExprNode clone()
clone
in interface ExprNode
clone
in class AbstractExprNode
public void addNode(ExprNode node)
node
- the child expression to add to this branch nodepublic void addNodeToHead(ExprNode node)
node
- the child expression to add to this branch nodepublic List<ExprNode> getChildren()
public void setChildren(List<ExprNode> list)
list
- the list of children to set.public ExprNode getFirstChild()
( ExprNode ) m_children.get( 0 )
public final Object accept(FilterVisitor visitor)
ExprNode
visitor
- the filter expression tree structure visitor
TODO - what is this modified element ?ExprNode.accept(
org.apache.directory.shared.ldap.filter.FilterVisitor)
public int hashCode()
hashCode
in class AbstractExprNode
Object.hashCode()
public boolean equals(Object other)
equals
in class AbstractExprNode
true
if both objects are equalObject.equals(Object)
Copyright © 2003–2015 The Apache Software Foundation. All rights reserved.