From db41807a17b82c7f62b2ff6f365a1f8fde7d48d9 Mon Sep 17 00:00:00 2001 From: Jakob Edding <15202881+JakobEdding@users.noreply.github.com> Date: Thu, 11 Apr 2024 19:19:00 +0200 Subject: [PATCH] Add javadocs --- .../bakdata/fluent_kafka_streams_tests/BaseOutput.java | 9 +++++++++ .../bakdata/fluent_kafka_streams_tests/TestOutput.java | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/fluent-kafka-streams-tests/src/main/java/com/bakdata/fluent_kafka_streams_tests/BaseOutput.java b/fluent-kafka-streams-tests/src/main/java/com/bakdata/fluent_kafka_streams_tests/BaseOutput.java index d60d366..c08bf40 100644 --- a/fluent-kafka-streams-tests/src/main/java/com/bakdata/fluent_kafka_streams_tests/BaseOutput.java +++ b/fluent-kafka-streams-tests/src/main/java/com/bakdata/fluent_kafka_streams_tests/BaseOutput.java @@ -116,6 +116,15 @@ public TestOutput asStream() { return new StreamOutput<>(this.testDriver, this.topic, this.keySerde, this.valueSerde); } + /** + * Convert the output to a {@link java.util.List}. In case the current instance of this class is a + * {@link StreamOutput}, the output will be converted to List with {@link org.apache.kafka.streams.kstream.KStream} + * semantics (each key multiple times). In case the current instance of this class is a {@link TableOutput}, the + * output will be converted to List with {@link org.apache.kafka.streams.kstream.KTable} semantics (each key only + * once). + * + * @return A {@link java.util.List} representing the output + */ @Override public List> toList() { final List> list = new ArrayList<>(); diff --git a/fluent-kafka-streams-tests/src/main/java/com/bakdata/fluent_kafka_streams_tests/TestOutput.java b/fluent-kafka-streams-tests/src/main/java/com/bakdata/fluent_kafka_streams_tests/TestOutput.java index 469e577..a3241da 100644 --- a/fluent-kafka-streams-tests/src/main/java/com/bakdata/fluent_kafka_streams_tests/TestOutput.java +++ b/fluent-kafka-streams-tests/src/main/java/com/bakdata/fluent_kafka_streams_tests/TestOutput.java @@ -145,10 +145,16 @@ default TestOutput withValueType(final Class valueType) { *

This is the default, there should usually be no need to call this method.

*

Note: once the first value of the stream has been read or the iterator has be called, you cannot switch * between the output types any more.

+ * * @return Current output with {@link org.apache.kafka.streams.kstream.KStream} semantics */ TestOutput asStream(); + /** + * Convert the output to a {@link java.util.List}. + * + * @return A {@link java.util.List} representing the output + */ List> toList(); }