-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNode.java
More file actions
53 lines (43 loc) · 812 Bytes
/
Node.java
File metadata and controls
53 lines (43 loc) · 812 Bytes
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
package matrix;
public class Node {
// Matrix node
public float _contents = 0;
public Node _right = null;
public Node _down = null;
public Node(float contents){
_contents = contents;
}
public Node(float contents, String place, Node node){
_contents = contents;
if(place == "down"){
_down = node;
}
else{
_right = node;
}
}
public Node(float contents, Node right, Node down){
_contents = contents;
_right = right;
_down = down;
}
public float get_contents(){
return _contents;
}
public Node get_right(){
return _right;
}
public Node get_down(){
return _down;
}
public void set_contents(float value){
_contents = value;
return;
}
public void set_right(Node right){
_right = right;
}
public void set_down(Node down){
_down = down;
}
}