Class AbstractExprNode
- java.lang.Object
-
- org.apache.directory.api.ldap.model.filter.AbstractExprNode
-
- Direct Known Subclasses:
AssertionNode
,BranchNode
,LeafNode
,ObjectClassNode
,ScopeNode
,UndefinedNode
public abstract class AbstractExprNode extends Object implements ExprNode
Abstract implementation of a expression node.- Author:
- Apache Directory Project
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExprNode
clone()
Clone the objectboolean
equals(Object o)
Object
get(Object key)
Gets an annotation on the tree by key.AssertionType
getAssertionType()
Gets the assertion type of this node.int
hashCode()
StringBuilder
printRefinementToBuffer(StringBuilder buf)
Default implementation for this method : just throw an exception.void
set(String key, Object value)
Sets a annotation key to a value.String
toString()
-
Methods inherited from interface org.apache.directory.api.ldap.model.filter.ExprNode
accept, isLeaf, isSchemaAware
-
-
-
-
Method Detail
-
getAssertionType
public AssertionType getAssertionType()
Description copied from interface:ExprNode
Gets the assertion type of this node. Make it possible to use switch statements on the node type.- Specified by:
getAssertionType
in interfaceExprNode
- Returns:
- the node's type
- See Also:
ExprNode.getAssertionType()
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classObject
- Returns:
true
if both objects are equal- See Also:
Object.equals(Object)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classObject
- Returns:
- the instance's hash code
- See Also:
Object.hashCode()
-
get
public Object get(Object key)
Description copied from interface:ExprNode
Gets an annotation on the tree by key.- Specified by:
get
in interfaceExprNode
- Parameters:
key
- the annotation key.- Returns:
- the annotation value.
- See Also:
ExprNode.get(java.lang.Object)
-
set
public void set(String key, Object value)
Description copied from interface:ExprNode
Sets a annotation key to a value.- Specified by:
set
in interfaceExprNode
- Parameters:
key
- the annotation key.value
- the annotation value.- See Also:
ExprNode.set(String, Object)
-
printRefinementToBuffer
public StringBuilder printRefinementToBuffer(StringBuilder buf)
Default implementation for this method : just throw an exception.- Specified by:
printRefinementToBuffer
in interfaceExprNode
- Parameters:
buf
- the buffer to append to.- Returns:
- The buffer in which the refinement has been appended
- Throws:
UnsupportedOperationException
- if this node isn't a part of a refinement.
-
toString
public String toString()
- Overrides:
toString
in classObject
- See Also:
Object.toString()
-
-