Search:

Type: Posts; User: pbrockway2

Search: Search took 0.22 seconds.

  1. Replies
    9
    Views
    1,953

    Re: Understanding the Comparable Interface

    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...
  2. Replies
    9
    Views
    1,953

    Re: Understanding the Comparable Interface

    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>() {
    ...
  3. Replies
    9
    Views
    1,953

    Re: Understanding the Comparable Interface

    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...
Results 1 to 3 of 3