In my c++ code i do stuff like this a lot
enum BarType {
BT_UNKNOWN = 0,
BT_NORMAL = 1,
BT_BAR_REST = 2,
BT_REPEAT_PREV_MEASURES = 3,
BT_TYPE_MASK = 0x03,
... etc
};
BarType GetBarType(int bn) { return (BarType)(m_barType[bn] & BT_TYPE_MASK); }
Is there a way to do this in java other than making everything ints which I hate because I like the type checking I get with enums?
Thanks