Package org.oddjob.events
Interface CompositeEvent<T>
- Type Parameters:
T- The type of the events being combined.
- All Superinterfaces:
InstantEvent<T>
- All Known Implementing Classes:
BinaryEvaluation,CompositeEventList,UnaryEvaluation
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 TypeMethodDescriptionintgetCount()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.getOfs()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>> stream()Return the combined events as a stream.Methods inherited from interface org.oddjob.events.InstantEvent
getOf, getTime
-
Method Details
-
getEvents
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
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
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.
-