|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.shared.ldap.util.tree.DnBranchNode<N>
public class DnBranchNode<N>
The Hierarchical Container holds elements ordered by their DN.
We can see them as directories, where the leaves are the files.
This class is *not* thread safe
| Constructor Summary | |
|---|---|
DnBranchNode()
Creates a new instance of a DnBranchNode. |
|
| Method Summary | |
|---|---|
void |
add(LdapDN dn,
N element)
TODO add. |
DnNode<N> |
addNode(java.lang.String rdn,
DnNode<N> child)
Directly adds a new child DnNode to the current DnBranchNode. |
boolean |
contains(java.lang.String rdn)
Tells if the current DnBranchNode contains another node associated with an rdn. |
DnNode<N> |
getChild(java.lang.String rdn)
Get's a child using an rdn string. |
N |
getParentElement(LdapDN 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(LdapDN 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. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DnBranchNode()
| Method Detail |
|---|
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(java.lang.String rdn,
DnNode<N> child)
rdn - The rdn of the child node to addchild - The child node to add
public boolean contains(java.lang.String rdn)
rdn - The name we are looking for
true if the tree instance contains this namepublic DnNode<N> getChild(java.lang.String rdn)
rdn - the rdn to use as the node key
public N getParentElement(LdapDN dn)
dn - the normalized distinguished name to resolve to a parent
public boolean hasParentElement(LdapDN dn)
dn - the normalized distinguished name to resolve to a parent
public boolean hasChildren()
true if the node has some children
public void add(LdapDN dn,
N element)
throws javax.naming.NamingException
dn - element -
javax.naming.NamingExceptionpublic void remove(N element)
element - The element to removepublic int size()
size in interface DnNode<N>public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||