you can use guava's Ints.compare(int, int) instead.