Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Javadoc #645

Merged
merged 2 commits into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public int currentOutputStreamWriteableSpaceLeft() throws IOException {
* it returns a completed future with null.
*
* @param requiredSize The size required to write to the current stream.
* @return CompletableFuture<T> A future that completes immediately with null if there is enough space,
* @return CompletableFuture{@code <T>} A future that completes immediately with null if there is enough space,
* or completes with the future returned by flushCommitAndResetStream if a flush is needed.
* @throws IOException if there are I/O errors when checking the stream's space or flushing.
*/
Expand Down Expand Up @@ -262,7 +262,7 @@ private void writeByteStringToCurrentStream(int fieldNum, String str) throws IOE
* otherwise a continuation. Returns a CompletableFuture that resolves upon the stream's closure.
*
* @param isFinal Indicates if this should be the final operation on the stream.
* @return CompletableFuture<T> A future that completes when the stream is closed. Returns null if already closed or no stream exists and 'isFinal' is false.
* @return CompletableFuture{@code <T>} A future that completes when the stream is closed. Returns null if already closed or no stream exists and 'isFinal' is false.
* @throws IOException if there are I/O errors during the operation.
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@
import lombok.AllArgsConstructor;

/**
* This class can be used to reduce a stream of Integers into a string (calling getFinalAccumulation()) To use
* ```
* Stream&lt;Integer&gt;...reduce(new SequentialSpanCompressingReducer(-1), SequentialSpanCompressingReducer::addNext,
* (c, d) -> { throw new IllegalStateException("parallel streams aren't allowed"); })
* ```
* This class can be used to reduce a stream of Integers into a string (calling getFinalAccumulation()).
*
* Example usage:
* <pre>{@code
* Stream<Integer> stream = ...
* String result = stream.reduce(new SequentialSpanCompressingReducer(-1),
* SequentialSpanCompressingReducer::addNext,
* (c, d) -> { throw new IllegalStateException("parallel streams aren't allowed"); })
* .getFinalAccumulation();
* }</pre>
*/
@AllArgsConstructor
public class SequentialSpanCompressingReducer {
Expand Down