|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--ereinion.util.BNTree
Implementazione di NTree che utilizza un Vector per mantenere la lista dei nodi figli.
| Method Summary | |
boolean |
getAllowsChildren()
Restituisce se il nodo consente di avere figli, indipendentemente dal fatto che già ne abbia oppure no. |
NTree |
getChildAt(int index)
Restituisce un nodo figli in posizione data. |
int |
getChildCount()
Restituisce il conteggio del numero di nodi figli contenuti in questo nodo. |
java.lang.Object |
getData()
Restituisce l'oggetto contenuto in questo nodo. |
NTree |
getParentNode()
Restituisce il nodo genitore di questo nodo. |
boolean |
isLeaf()
Stabilisce se questo è un nodo foglio (senza figli). |
boolean |
isRoot()
Stabilisce se questo è un nodo radice (nodo senza genitore). |
static BNTree |
makeNode(BNTree parent,
java.lang.Object d,
boolean ac)
Crea un nuovo nodo. |
static BNTree |
makeRoot(java.lang.Object data,
boolean ac)
Crea un nuovo nodo radice. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public java.lang.Object getData()
NTree
getData in interface NTreetrue se questo nodo è un nodo radice, false altrimenti.public NTree getParentNode()
NTree
getParentNode in interface NTreepublic int getChildCount()
NTree
getChildCount in interface NTreepublic NTree getChildAt(int index)
NTree
getChildAt in interface NTreeindex - la posizione del nodo figli da restituire.
public boolean isRoot()
NTree
isRoot in interface NTreetrue se questo nodo è un nodo radice, false altrimenti.public boolean isLeaf()
NTree
isLeaf in interface NTreetrue se questo nodo è un nodo radice, false altrimenti.public boolean getAllowsChildren()
NTree
getAllowsChildren in interface NTreetrue se il nodo permette già figli, false altrimenti.
public static BNTree makeRoot(java.lang.Object data,
boolean ac)
data - il dato contenuto nella radice.ac - true se il nodo deve essere già impostato per contenere figli.
public static BNTree makeNode(BNTree parent,
java.lang.Object d,
boolean ac)
parent - il nodo genitore.d - il dato contenuto nel nodo.ac - true se il nodo deve essere già impostato per contenere figli.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||