|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object rdr.core.Node
public abstract class Node
An abstract Node class When implementing a Node style object for a particular method, extend this if at all possible.
Field Summary | |
---|---|
Classification |
classification
|
int |
id
|
Rule |
rule
|
Constructor Summary | |
---|---|
Node(int id)
Instanciate a node - auto sets the next nodeID |
Method Summary | |
---|---|
Classification |
getClassification()
|
abstract int |
getDepth()
Returns the depth of a branch of the knowledge base. |
int |
getId()
Fetch the node's id |
abstract int |
getNumChildren()
|
Rule |
getRule()
|
void |
setClassification(Classification c)
Set the node's classification |
void |
setId(int id)
Set the node's id WARNING: If you use this method you might upset the node numbering and thus indexing. |
void |
setRule(Rule r)
Set the node's rule |
java.lang.String |
toString()
Convert the node to readable text |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public Classification classification
public Rule rule
public int id
Constructor Detail |
---|
public Node(int id)
Method Detail |
---|
public Classification getClassification()
public Rule getRule()
public java.lang.String toString()
toString
in class java.lang.Object
public void setClassification(Classification c)
c
- the classificationpublic void setRule(Rule r)
r
- the rulepublic int getId()
public void setId(int id)
id
- the idpublic abstract int getDepth()
public abstract int getNumChildren()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |