Interface CompositeEvent<T>

Type Parameters:
T - The type of the events being combined.
All Superinterfaces:
InstantEvent<T>
All Known Implementing Classes:
BinaryEvaluation, CompositeEventList, UnaryEvaluation

public interface CompositeEvent<T> extends InstantEvent<T>
The result of combining InstantEvent events. This is also an InstantEvent the payload of which may be a new thing or one of the things being combined.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Get the number of events that have been combined.
    InstantEvent<? extends T>
    getEvents(int index)
    Get the event in the combination at the given index.
    Get all the ofs from all the events in this composite and it's children.
    static <T> CompositeEvent<T>
    of(InstantEvent<T>... eventOfs)
    Create a new instance from these events.
    Stream<InstantEvent<? extends T>>
    Return the combined events as a stream.

    Methods inherited from interface org.oddjob.events.InstantEvent

    getOf, getTime
  • Method Details

    • getEvents

      InstantEvent<? extends T> getEvents(int index)
      Get the event in the combination at the given index.
      Parameters:
      index - The index.
      Returns:
      The event.
    • getCount

      int getCount()
      Get the number of events that have been combined.
      Returns:
      The number of events.
    • getOfs

      List<T> getOfs()
      Get all the ofs from all the events in this composite and it's children.
      Returns:
      A list of all the ofs.
    • stream

      Stream<InstantEvent<? extends T>> stream()
      Return the combined events as a stream.
      Returns:
    • of

      static <T> CompositeEvent<T> of(InstantEvent<T>... eventOfs)
      Create a new instance from these events.
      Type Parameters:
      T - The type of the events.
      Parameters:
      eventOfs - The events to create these from.
      Returns:
      A new instance.