MCPcopy Create free account
hub / github.com/apache/tomcat / sum

Method sum

java/org/apache/el/stream/Stream.java:473–481  ·  view source on GitHub ↗

Returns the sum of all numeric elements in the stream. @return the sum of all elements

()

Source from the content-addressed store, hash-verified

471 * @return the sum of all elements
472 */
473 public Number sum() {
474 Number sum = Long.valueOf(0);
475
476 while (iterator.hasNext()) {
477 sum = ELArithmetic.add(sum, iterator.next());
478 }
479
480 return sum;
481 }
482
483
484 /**

Callers 7

getNumIdleMethod · 0.80
getNumWaitersMethod · 0.80
getProcessingTimeMethod · 0.80
getRequestCountMethod · 0.80
getErrorCountMethod · 0.80
getLookupCountMethod · 0.80
getHitCountMethod · 0.80

Calls 4

addMethod · 0.95
hasNextMethod · 0.65
nextMethod · 0.65
valueOfMethod · 0.45

Tested by

no test coverage detected