Java Collection Sum sum(Collection values)

Here you can find the source of sum(Collection values)

Description

sum

License

Open Source License

Parameter

Parameter Description
values a parameter

Declaration

public static double sum(Collection<Double> values) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.Collection;

public class Main {
    /**/*from   w ww  .  j  av a  2  s. co m*/
     * @param values
     * @return
     */
    public static double sum(Collection<Double> values) {
        double ret = 0;
        for (Double d : values)
            ret += d;
        return ret;
    }
}

Related

  1. sum(Collection collection)
  2. sum(Collection list)
  3. sum(Collection values)
  4. sum(Collection values)
  5. sum(Collection values)
  6. sum(Collection vec)
  7. sum(Collection values)
  8. sum(Collection collection)
  9. sum(final Collection values)