merge dev into test #33
@@ -10,7 +10,7 @@ public class StartNode extends Node {
|
|||||||
/**
|
/**
|
||||||
* The color of the node.
|
* The color of the node.
|
||||||
*/
|
*/
|
||||||
private int color;
|
private Color color;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new start node with the given color.
|
* Creates a new start node with the given color.
|
||||||
@@ -18,11 +18,11 @@ public class StartNode extends Node {
|
|||||||
* @param color the color of the node
|
* @param color the color of the node
|
||||||
*/
|
*/
|
||||||
public StartNode(Color color) {
|
public StartNode(Color color) {
|
||||||
this.color = color.ordinal();
|
this.color = color;
|
||||||
}
|
}
|
||||||
|
|
||||||
private StartNode() {
|
private StartNode() {
|
||||||
color = Color.NONE.ordinal();
|
color = Color.NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -31,7 +31,7 @@ private StartNode() {
|
|||||||
* @return the color of the node
|
* @return the color of the node
|
||||||
*/
|
*/
|
||||||
public Color getColor() {
|
public Color getColor() {
|
||||||
return Color.values()[color];
|
return color;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -40,6 +40,6 @@ public Color getColor() {
|
|||||||
* @param color the new color of the node
|
* @param color the new color of the node
|
||||||
*/
|
*/
|
||||||
public void setColor(Color color) {
|
public void setColor(Color color) {
|
||||||
this.color = color.ordinal();
|
this.color = color;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user