public class DnBranchNode<N> extends Object implements DnNode<N>
Constructor and Description |
---|
DnBranchNode()
Creates a new instance of a DnBranchNode.
|
Modifier and Type | Method and Description |
---|---|
void |
add(DN dn,
N element)
TODO add.
|
DnNode<N> |
addNode(String rdn,
DnNode<N> child)
Directly adds a new child DnNode to the current DnBranchNode.
|
boolean |
contains(String rdn)
Tells if the current DnBranchNode contains another node associated
with an rdn.
|
DnNode<N> |
getChild(String rdn)
Get's a child using an rdn string.
|
N |
getParentElement(DN dn)
Get the parent of a given DN, if present in the tree.
|
boolean |
hasChildren()
Tells if a branchNode has some children or not
|
boolean |
hasParentElement(DN dn)
Tells if the DN contains a parent in the tree.
|
boolean |
isLeaf()
Tells if the implementation is a leaf node.
|
void |
remove(N element)
Removes an element from the tree.
|
int |
size()
Returns the number of entries under this node.
|
String |
toString() |
public boolean isLeaf()
DnNode
isLeaf
in interface DnNode<N>
true
if the class is a leaf node, false otherwise.DnNode.isLeaf()
public DnNode<N> addNode(String rdn, DnNode<N> child)
rdn
- The rdn of the child node to addchild
- The child node to addpublic boolean contains(String rdn)
rdn
- The name we are looking fortrue
if the tree instance contains this namepublic DnNode<N> getChild(String rdn)
rdn
- the rdn to use as the node keypublic N getParentElement(DN dn)
dn
- the normalized distinguished name to resolve to a parentpublic boolean hasParentElement(DN dn)
dn
- the normalized distinguished name to resolve to a parentpublic boolean hasChildren()
true
if the node has some childrenpublic void add(DN dn, N element) throws LdapException
dn
- element
- NamingException
LdapException
public void remove(N element)
element
- The element to removepublic int size()
public String toString()
toString
in class Object
Object.toString()
Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.