a) If all derived from a static set of values
Color.blue
Color.red
can use ==
b) Otherwise
A.equals(B)