Java Collection Sum sumDouble(Collection collection)

Here you can find the source of sumDouble(Collection collection)

Description

sum Double

License

Open Source License

Declaration

public static Double sumDouble(Collection<Double> collection) 

Method Source Code

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

import java.util.Collection;

public class Main {
    public static Double sumDouble(Collection<Double> collection) {
        Double result = 0.0;/*from www .ja va2 s . c  o  m*/
        for (Double n : collection) {
            result += n;
        }
        return result;
    }
}

Related

  1. sum(Collection values)
  2. sum(Collection vec)
  3. sum(Collection values)
  4. sum(Collection collection)
  5. sum(final Collection values)
  6. summarizeCollection(Collection collection, String collectionType, String elementType)
  7. sumNumberCollection(Collection numbers)