Is there any better way than doing:
if ((newState & InputState.DEFAULT) == InputState.DEFAULT)
? My InputState.class defines static int variables to the power of 2 that are being ORed with an int to make it possible to determine more than one input state. However, checking the existence of a set bit like this looks just odd to me (and means writing alot of code that is obvious to come anyway) I was wondering whether there is a better solution to that.