compareTo method
Compares checkbox states based on their declaration order.
Returns negative if this state comes before other
, zero if equal,
positive if this state comes after other
in the enum declaration.
Implementation
@override
int compareTo(CheckboxState other) {
return index.compareTo(other.index);
}