[java] How to check if an integer is in a given range?