|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpt.tumba.geoclass.Node
public class Node
A Node in the probabilistic graphical model of geographical concepts.
Constructor Summary | |
---|---|
Node()
Constructor for an uninitialized Node |
|
Node(java.lang.Integer id)
Constructor for Node |
|
Node(java.lang.Integer id,
java.lang.String name,
java.lang.String type,
java.lang.Integer population)
Constructor for Node . |
Method Summary | |
---|---|
int |
compareTo(java.lang.Object o)
Compares this Node with other nodes with basis on the ID for this geographical concept at the knowledge base (GKB). |
boolean |
equals(java.lang.Object o)
Compares this Node with other nodes with basis on the ID for this geographical concept at the knowledge base (GKB). |
java.lang.Integer |
getID()
Returns the ID for this geographical concept at the knowledge base (GKB). |
java.lang.String |
getName()
Returns the Name associated with this geographical concept. |
java.lang.Integer |
getPopulation()
Returns the number of habitants associated with this region, or -1 if the information is not available. |
java.lang.String |
getType()
Returns the type of this geographical concept. |
int |
hashCode()
Overrides the defult hashCode() method, instead calculating
the hash code for this object with basis on the ID for this geographical concept
at the knowledge base (GKB). |
boolean |
isType(java.lang.String t)
Checks if this geographical concept is of a given type. |
java.lang.Integer |
setID(java.lang.Integer id)
Sets the ID for this geographical concept at the knowledge base (GKB). |
java.lang.String |
setName(java.lang.String name)
Associates a name with this geographic concept. |
java.lang.Integer |
setPopulation(java.lang.Integer population)
Sets the number of habitants associated with this region. |
java.lang.String |
setType(java.lang.String type)
Sets the type of this geographic concept. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Node()
Node
public Node(java.lang.Integer id)
Node
id
- The ID for this geographical concept at the knowledge base (GKB).public Node(java.lang.Integer id, java.lang.String name, java.lang.String type, java.lang.Integer population)
Node
.
id
- The ID for this geographical concept at the knowledge base (GKB).name
- The Name associated with this geographical concept.type
- The type of this geographical concept.population
- Number of habitants associated with this region.Method Detail |
---|
public java.lang.String getName()
public java.lang.Integer getID()
public java.lang.Integer getPopulation()
public java.lang.String getType()
public boolean isType(java.lang.String t)
t
- A geographical concept type.
public java.lang.String setName(java.lang.String name)
name
- The Name associated with this geographical concept.
public java.lang.String setType(java.lang.String type)
type
- The type of this geographical concept.
public java.lang.Integer setID(java.lang.Integer id)
id
- The ID for this geographical concept at the knowledge base (GKB).
public java.lang.Integer setPopulation(java.lang.Integer population)
population
- Number of habitants associated with this region.
public int hashCode()
hashCode()
method, instead calculating
the hash code for this object with basis on the ID for this geographical concept
at the knowledge base (GKB).
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o) throws java.lang.ClassCastException
equals
in class java.lang.Object
o
- Another object (instance of Integer
or Node
)
java.lang.ClassCastException
public int compareTo(java.lang.Object o) throws java.lang.ClassCastException
compareTo
in interface java.lang.Comparable
o
- Another object (instance of Integer
or Node
)
java.lang.ClassCastException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |