Java Collection Max calculateMaxTime(Collection times)

Here you can find the source of calculateMaxTime(Collection times)

Description

Calculate the biggest so the slowest execution time.

License

Apache License

Parameter

Parameter Description
times a parameter

Declaration

public static long calculateMaxTime(Collection<Long> times) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.util.Collection;

public class Main {
    /**/*from ww w. j  av  a  2 s  . co m*/
     * Calculate the biggest so the slowest execution time.
     *
     * @param times
     * @return
     */
    public static long calculateMaxTime(Collection<Long> times) {
        long maxTime = 0;
        for (long value : times) {
            maxTime = value > maxTime ? value : maxTime;
        }

        return maxTime;
    }
}

Related

  1. format(String theLabel, Collection coll, int maxNumberReported, String theClassName)
  2. getMaximumElementLength(final Collection collection)
  3. max(Collection coll)
  4. max(Collection data)