Package com.avoka.fc.core.stream
Class StreamData<T>
java.lang.Object
com.avoka.fc.core.stream.StreamData<T>
- Type Parameters:
T
- the type of data in the stream records
Represents a collection of stream records.
- Since:
- 24.4.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionadd
(StreamRecord<T> record) Adds a single stream record to the collection.addAll
(List<StreamRecord<T>> records) Adds multiple stream records to the collection.boolean
isEmpty()
Checks if the collection is empty.records()
Retrieves a copy of the list of stream records.int
size()
Retrieves the number of records in the collection.toString()
Retrieves the string representation of the stream data.
-
Constructor Details
-
StreamData
public StreamData()
-
-
Method Details
-
add
Adds a single stream record to the collection.- Parameters:
record
- the stream record to add- Returns:
- the updated StreamData instance
-
addAll
Adds multiple stream records to the collection.- Parameters:
records
- the list of stream records to add- Returns:
- the updated StreamData instance
-
isEmpty
public boolean isEmpty()Checks if the collection is empty.- Returns:
- true if the collection is empty, false otherwise
-
size
public int size()Retrieves the number of records in the collection.- Returns:
- the number of records
-
records
Retrieves a copy of the list of stream records.- Returns:
- a list of stream records
-
toString
Retrieves the string representation of the stream data.
-