-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCondition.java
More file actions
45 lines (37 loc) · 872 Bytes
/
Condition.java
File metadata and controls
45 lines (37 loc) · 872 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
package datastructure;
import javafx.scene.paint.Color;
/**
* Created by 101010.
*/
public abstract class Condition {
/**
* The color to be painted when condition holds.
*/
private final Color color;
/**
* Default constructor.
*/
public Condition() {
color = Color.BLACK;
}
/**
* Constructor of the condition.
* @param color the color of this condition.
*/
public Condition(Color color) {
this.color = color;
}
/**
* Derives if condition holds.
* @param drawNode the node to derive condition on.
* @return true iff the condition holds.
*/
public abstract boolean addColor(DrawNode drawNode);
/**
* Gets the color of the condition.
* @return the color of the condition.
*/
public Color getColor() {
return color;
}
}