public class TreeNode extends Object implements Serializable, Comparable<TreeNode>
Constructor and Description |
---|
TreeNode(int id,
String label,
String suffix,
TreeNode father) |
TreeNode(int id,
String label,
TreeNode father) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(TreeNode o) |
List<TreeNode> |
getAllNodes()
Get recursively all Tree Nodes below the target node
|
ArrayList<TreeNode> |
getChildren()
Get the direct children of the target node
|
TreeNode |
getFather()
Get the father of the target node
|
Integer |
getId() |
String |
getLabel() |
Integer |
getMaxId()
Get the max id within all node under the target node
|
int |
getNoOfChildren() |
String |
getProduction()
Get the node production in the form of string.
|
String |
getSuffix()
If given, it return the node suffix, e.g.
|
boolean |
hasChildren() |
boolean |
hasSuffix()
This function returns true if the node label contains a suffix, e.g.
|
String |
toString() |
protected String label
public int compareTo(TreeNode o)
compareTo
in interface Comparable<TreeNode>
public List<TreeNode> getAllNodes()
public ArrayList<TreeNode> getChildren()
public TreeNode getFather()
public Integer getId()
public String getLabel()
public Integer getMaxId()
public int getNoOfChildren()
public String getProduction()
public String getSuffix()
public boolean hasChildren()
public boolean hasSuffix()
Copyright © 2014 Semantic Analytics Group @ Uniroma2. All rights reserved.