Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
8242281: IntStream.html#reduce doc should not mention average
Remove mention of average function in apiNote of IntStream::reduce(int, IntBinaryOperator)

Reviewed-by: psandoz, jlaskey, lancea, dfuchs
  • Loading branch information
c-cleary authored and FrauBoes committed Jun 2, 2020
1 parent f7a65b7 commit 22532ff30e3c3fd6e1466315ae6cac783a8c801c
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/java.base/share/classes/java/util/stream/IntStream.java
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -474,8 +474,9 @@ default IntStream dropWhile(IntPredicate predicate) {
* <p>This is a <a href="package-summary.html#StreamOps">terminal
* operation</a>.
*
* @apiNote Sum, min, max, and average are all special cases of reduction.
* Summing a stream of numbers can be expressed as:
* @apiNote Sum, min and max are all special cases of reduction that can be
* expressed using this method.
* For example, summing a stream can be expressed as:
*
* <pre>{@code
* int sum = integers.reduce(0, (a, b) -> a+b);

0 comments on commit 22532ff

Please sign in to comment.