|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.directory.shared.ldap.filter.AbstractExprNode
org.apache.directory.shared.ldap.filter.BranchNode
public class BranchNode
Node representing branches within the expression tree corresponding to logical operators within the filter expression.
| Field Summary |
|---|
| Fields inherited from class org.apache.directory.shared.ldap.filter.AbstractExprNode |
|---|
AND, APPROXIMATE, ASSERTION, EQUALITY, EXTENSIBLE, GREATEREQ, LESSEQ, NOT, OR, PRESENCE, SCOPE, SUBSTRING |
| Constructor Summary | |
|---|---|
BranchNode(int an_operator)
Creates a BranchNode using a logical operator. |
|
BranchNode(int an_operator,
java.util.ArrayList a_childList)
Creates a BranchNode using a logical operator and a list of children. |
|
| Method Summary | |
|---|---|
void |
accept(FilterVisitor visitor)
Element/node accept method for visitor pattern. |
void |
addNode(ExprNode a_node)
Adds a child node to this branch node if it allows it. |
void |
addNodeToHead(ExprNode a_node)
Adds a child node to this branch node if it allows it at the head rather than the tail. |
boolean |
equals(java.lang.Object other)
|
ExprNode |
getChild()
Convenience method that gets the first child in the children array. |
java.util.ArrayList |
getChildren()
Gets the children below this BranchNode. |
int |
getOperator()
Gets the operator for this branch node. |
static java.lang.String |
getOperatorString(int a_operator)
Gets a human readable representation for the operators: AND for '&', OR for '|' and NOT for '!'. |
boolean |
isConjunction()
Tests whether or not this node is a conjunction (a AND'ed branch). |
boolean |
isDisjunction()
Tests whether or not this node is a disjunction (a OR'ed branch). |
boolean |
isLeaf()
Tests to see if this node is a leaf or branch node. |
boolean |
isNegation()
Tests whether or not this node is a negation (a NOT'ed branch). |
java.lang.StringBuffer |
printToBuffer(java.lang.StringBuffer a_buf)
Recursively prints the String representation of this node and all its descendents to a buffer. |
(package private) void |
setChildren(java.util.ArrayList a_list)
Sets the list of children under this node. |
void |
setOperator(int m_operator)
Added for rare power-user cases where visitor needs to rewrite filter in-place. |
java.lang.String |
toString()
Gets the recursive prefix string represent of the filter from this node down. |
| Methods inherited from class org.apache.directory.shared.ldap.filter.AbstractExprNode |
|---|
escapeFilterValue, get, getAnnotations, getAssertionType, getOperationString, set, unescapeFilterValue |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public BranchNode(int an_operator,
java.util.ArrayList a_childList)
an_operator - the logical operator to use for this branch node.a_childList - the child nodes under this branch node.public BranchNode(int an_operator)
an_operator - the logical operator to use for this branch node.| Method Detail |
|---|
public void addNode(ExprNode a_node)
a_node - the child expression to add to this branch nodepublic void addNodeToHead(ExprNode a_node)
a_node - the child expression to add to this branch nodepublic final boolean isLeaf()
ExprNode
ExprNode.isLeaf()public java.util.ArrayList getChildren()
public ExprNode getChild()
( ExprNode ) m_children.get( 0 )
void setChildren(java.util.ArrayList a_list)
a_list - the list of children to set.public int getOperator()
public void setOperator(int m_operator)
public boolean isDisjunction()
public boolean isConjunction()
public final boolean isNegation()
public java.lang.StringBuffer printToBuffer(java.lang.StringBuffer a_buf)
a_buf - the buffer to append to.ExprNode.printToBuffer(java.lang.StringBuffer)public static java.lang.String getOperatorString(int a_operator)
a_operator - the operator constant.
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public void accept(FilterVisitor visitor)
ExprNode
visitor - the filter expression tree structure visitorExprNode.accept(
org.apache.directory.shared.ldap.filter.FilterVisitor)public boolean equals(java.lang.Object other)
equals in class AbstractExprNode
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||