Skip to content

Commit

Permalink
Fix Javadoc
Browse files Browse the repository at this point in the history
Signed-off-by: Andre Kurait <akurait@amazon.com>
  • Loading branch information
AndreKurait committed May 9, 2024
1 parent e80b6c2 commit 83ac55a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
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

0 comments on commit 83ac55a

Please sign in to comment.