Replaced Long.compare with Long.compareTo for compatibility with Java 6.