This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-lang.git
The following commit(s) were added to refs/heads/master by this push: new eb15d36 Add missing Javadoc. eb15d36 is described below commit eb15d360b471ac562d7211b8e7b56b2fa0ca45c5 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Fri Jul 23 09:01:56 2021 -0400 Add missing Javadoc. --- src/main/java/org/apache/commons/lang3/stream/Streams.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/java/org/apache/commons/lang3/stream/Streams.java b/src/main/java/org/apache/commons/lang3/stream/Streams.java index ef6612d..d9d6a2a 100644 --- a/src/main/java/org/apache/commons/lang3/stream/Streams.java +++ b/src/main/java/org/apache/commons/lang3/stream/Streams.java @@ -172,6 +172,11 @@ public class Streams { return stream().anyMatch(Failable.asPredicate(predicate)); } + /** + * Throws IllegalStateException if this stream is already terminated. + * + * @throws IllegalStateException if this stream is already terminated. + */ protected void assertNotTerminated() { if (terminated) { throw new IllegalStateException("This stream is already terminated."); @@ -332,6 +337,11 @@ public class Streams { stream().forEach(Failable.asConsumer(action)); } + /** + * Marks this stream as terminated. + * + * @throws IllegalStateException if this stream is already terminated. + */ protected void makeTerminated() { assertNotTerminated(); terminated = true;