Java Collection Max max(Collection coll)

Here you can find the source of max(Collection coll)

Description

max

License

Apache License

Declaration

public static <T extends Object & Comparable<? super T>> T max(Collection<? extends T> coll) 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * Copyright (c) 2005, 2014 springside.github.io
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 *******************************************************************************/

import java.util.*;

public class Main {

    public static <T extends Object & Comparable<? super T>> T max(Collection<? extends T> coll) {
        return Collections.max(coll);
    }/*from  w  w  w .  j ava  2 s  .co m*/

    public static <T> T max(Collection<? extends T> coll, Comparator<? super T> comp) {
        return Collections.max(coll, comp);
    }
}

Related

  1. calculateMaxTime(Collection times)
  2. format(String theLabel, Collection coll, int maxNumberReported, String theClassName)
  3. getMaximumElementLength(final Collection collection)
  4. max(Collection data)
  5. max(Collection doubles)
  6. max(Collection values)
  7. max(Collection collection)