forked from Yehudit-Brickner/OOP2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNodeData.java
53 lines (52 loc) · 1.29 KB
/
NodeData.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/**
* This interface represents the set of operations applicable on a
* node (vertex) in a (directional) weighted graph.
* @author boaz.benmoshe
*/
public interface NodeData {
/**
* Returns the key (id) associated with this node.
* @return
*/
public int getKey();
/** Returns the location of this node, if none return null.
* @return
*/
public GeoLocation getLocation();
/** Allows changing this node's location.
* @param p - new new location (position) of this node.
*/
public void setLocation(GeoLocation p);
/**
* Returns the weight associated with this node.
* @return
*/
public double getWeight();
/**
* Allows changing this node's weight.
* @param w - the new weight
*/
public void setWeight(double w);
/**
* Returns the remark (meta data) associated with this node.
* @return
*/
public String getInfo();
/**
* Allows changing the remark (meta data) associated with this node.
* @param s
*/
public void setInfo(String s);
/**
* Temporal data (aka color: e,g, white, gray, black)
* which can be used be algorithms
* @return
*/
public int getTag();
/**
* Allows setting the "tag" value for temporal marking an node - common
* practice for marking by algorithms.
* @param t - the new value of the tag
*/
public void setTag(int t);
}