Skip to content

Commit

Permalink
StreamEx#withFirst: JavaDoc updated (spotted by naftalmm in #232)
Browse files Browse the repository at this point in the history
  • Loading branch information
amaembo committed Sep 6, 2020
1 parent 1c1813d commit 631cd5a
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/main/java/one/util/streamex/StreamEx.java
Original file line number Diff line number Diff line change
Expand Up @@ -1759,16 +1759,17 @@ public <U> StreamEx<U> intervalMap(BiPredicate<? super T, ? super T> sameInterva

/**
* Returns a stream consisting of the results of applying the given function
* to the the first element and every other element of this stream.
* to the the first element and every single element of this stream.
* When the mapper is called for the first element of the resulting stream,
* both its arguments are the same and equal to the first element of this stream.
*
* <p>
* This is a <a href="package-summary.html#StreamOps">quasi-intermediate
* operation</a>.
*
* <p>
* The size of the resulting stream is one element less than the input
* stream. If the input stream is empty or contains just one element, then
* the output stream will be empty.
* The size of the resulting stream is exactly the same as the size of the input
* stream.
*
* @param <R> The element type of the new stream
* @param mapper a non-interfering, stateless function to apply to the first
Expand All @@ -1786,16 +1787,16 @@ public <R> StreamEx<R> withFirst(BiFunction<? super T, ? super T, ? extends R> m
/**
* Creates an {@link EntryStream} consisting of the {@link Entry} objects
* which keys are all the same and equal to the first element of this stream
* and values are the rest elements of this stream.
* and values are the original elements of this stream. The first element
* of the resulting stream has the same key and value.
*
* <p>
* This is a <a href="package-summary.html#StreamOps">quasi-intermediate
* operation</a>.
*
* <p>
* The size of the resulting stream is one element less than the input
* stream. If the input stream is empty or contains just one element, then
* the output stream will be empty.
* The size of the resulting stream is exactly the same as the size of the input
* stream.
*
* @return the new stream
* @see #withFirst(BiFunction)
Expand Down

0 comments on commit 631cd5a

Please sign in to comment.