//copyright (C) 2007 Mocanu Cristian Romeo
package balls;
import java.util.LinkedList;
import java.util.List;
public enum BallState {
EXCLUDED, UNKNOWN,
UNKNOWN_LIGHT, UNKNOWN_HEAVY;
public
boolean isUnknown() {
return (this == UNKNOWN || this == UNKNOWN_LIGHT || this ==
UNKNOWN_HEAVY);
}
public
BallState nextState() {
assert this != EXCLUDED;
switch (this) {
case UNKNOWN:
return
UNKNOWN_LIGHT;
case UNKNOWN_LIGHT:
return
UNKNOWN_HEAVY;
default:
return EXCLUDED;
}
}
}