code: @SuppressWarnings({"unchecked", "rawtypes"})
      public static <T> T min(Collection<? extends T> coll, Comparator<? super T> comp) {
          if (comp==null)
              return (T)min((Collection) coll);
  
          Iterator<? extends T> i = coll.iterator();
          T candidate = i.next();
  
          while (i.hasNext()) {
              T next = i.next();
              if (comp.compare(next, candidate) < 0)
                  candidate = next;
          }
          return candidate;
      }
docs: Returns the minimum element of the given collection, according to the
  order induced by the specified comparator.  All elements in the
  collection must be <i>mutually comparable</i> by the specified
  comparator (that is, <tt>comp.compare(e1, e2)</tt> must not throw a
  <tt>ClassCastException</tt> for any elements <tt>e1</tt> and
  <tt>e2</tt> in the collection).<p>
  
  This method iterates over the entire collection, hence it requires
  time proportional to the size of the collection.
  
  @param  <T> the class of the objects in the collection
  @param  coll the collection whose minimum element is to be determined.
  @param  comp the comparator with which to determine the minimum element.
  A <tt>null</tt> value indicates that the elements' <i>natural
  ordering</i> should be used.
  @return the minimum element of the given collection, according
  to the specified comparator.
  @throws ClassCastException if the collection contains elements that are
  not <i>mutually comparable</i> using the specified comparator.
  @throws NoSuchElementException if the collection is empty.
  @see Comparable