Class StreamData<T>

java.lang.Object
com.avoka.fc.core.stream.StreamData<T>
Type Parameters:
T - the type of data in the stream records

public class StreamData<T> extends Object
Represents a collection of stream records.
Since:
24.4.0
  • Constructor Details

    • StreamData

      public StreamData()
  • Method Details

    • add

      public StreamData<T> add(StreamRecord<T> record)
      Adds a single stream record to the collection.
      Parameters:
      record - the stream record to add
      Returns:
      the updated StreamData instance
    • addAll

      public StreamData<T> addAll(List<StreamRecord<T>> records)
      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

      public List<StreamRecord<T>> records()
      Retrieves a copy of the list of stream records.
      Returns:
      a list of stream records
    • toString

      public String toString()
      Retrieves the string representation of the stream data.
      Overrides:
      toString in class Object
      Returns:
      the string representation of the stream data