Changing sort method in collections to be compliant with Java 7