|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object pt.tumba.cluster.Hierarchy
public class Hierarchy
This class represents a node in the subsumption hierarchy
Field Summary | |
---|---|
private java.util.Map |
children
The list of children in this node |
private java.lang.String |
key
The term defining this node |
private java.util.Map |
objects
The list of all the terms in the hierarchy, used for sorting |
private static java.util.Random |
rand
Random number generator, used by the quick sort algorithm |
Constructor Summary | |
---|---|
Hierarchy(java.lang.String key,
java.util.Map objects)
Constructor for the Node object |
Method Summary | |
---|---|
Hierarchy |
addChild(java.lang.String key)
Adds a feature to the Child attribute of the Node object |
Hierarchy |
addChildRecursive(Hierarchy node)
Adds a node to all the children of the Node object |
private static java.util.List |
exchangePos(java.util.List v,
int p1,
int p2)
Exchange two values in a list |
Hierarchy |
getChild(java.lang.String key)
Gets the node attribute of the Node object |
java.lang.String |
getKey()
|
boolean |
hasChild(java.lang.String term)
Description of the Method |
boolean |
hasChildRecursive(java.lang.String term)
Description of the Method |
java.util.List |
orderedObjects()
Description of the Method |
void |
removeChild(java.lang.String term)
Description of the Method |
void |
removeChildRecursive(java.lang.String term)
Description of the Method |
java.util.List |
terms()
Description of the Method |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static java.util.Random rand
private java.util.Map children
private java.lang.String key
private java.util.Map objects
Constructor Detail |
---|
Hierarchy(java.lang.String key, java.util.Map objects)
term
- The term defining the nodeterms
- The list of all the terms in the hierarchy, used for sortingMethod Detail |
---|
private static java.util.List exchangePos(java.util.List v, int p1, int p2)
v
- The original listp1
- The index of the first elementp2
- The index of the second element
public Hierarchy addChildRecursive(Hierarchy node)
node
- The feature to be added to the Child attribute
public Hierarchy addChild(java.lang.String key)
term
- The feature to be added to the Child attribute
public Hierarchy getChild(java.lang.String key)
term
- Description of the Parameter
public boolean hasChild(java.lang.String term)
term
- Description of the Parameter
public boolean hasChildRecursive(java.lang.String term)
term
- Description of the Parameter
public java.util.List orderedObjects()
public void removeChild(java.lang.String term)
term
- Description of the Parameterpublic void removeChildRecursive(java.lang.String term)
term
- Description of the Parameterpublic java.util.List terms()
public java.lang.String getKey()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |