Basically, what I want to do is check two integers against a given value, therefore, classically what you would do is something like this:
//just to get some
There is no special syntax for that. You could make a function for that. Assuming at least Java 1.5:
public boolean eitherOneEquals(T o1, T o2, T expectedValue) { return o1.equals(expectedValue) || o2.equals(expectedValue); } if(eitherOneEquals(o1, o2, expectedValue)) { // do something... }