Schematically compareTo() is used to sort a list of comparable things as follows:
(1) Sorting the list is turned into sorting an array of comparable things by the Collections method
Then, in...
Type: Posts; User: pbrockway2
Schematically compareTo() is used to sort a list of comparable things as follows:
(1) Sorting the list is turned into sorting an array of comparable things by the Collections method
Then, in...
I only have the 1.7 source on this machine. But, commented out, is the definition of NATURAL_ORDER:
private static final Comparator<Object> NATURAL_ORDER = new Comparator<Object>() {
...
Generally when some type of thing is comparable with others of its kind (say people by age, or beer glasses by volume) it is often the case that some outside agency does the comparing: the barman...