Class CombineWithLatestStreamId<T,D,R>
- java.lang.Object
-
- org.streamingpool.core.service.streamid.CombineWithLatestStreamId<T,D,R>
-
- Type Parameters:
T- Type of the stream which will trigger the emitting of a new elementD- Type of the original data streamR- Type of the returned value (= type of the resulting stream)
- All Implemented Interfaces:
java.io.Serializable,StreamId<R>
public class CombineWithLatestStreamId<T,D,R> extends java.lang.Object implements StreamId<R>, java.io.Serializable
Given a data stream and a stream of triggering events, the resulting stream emits as soon as the trigger stream emits. The emitted value is determined by the comining function, and can thus be computed from the emitted value of the triggered stream and the latest emitted item of the data stream. stream at the moment of each triggering event- See Also:
CombineWithLatestStreamFactory, Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T,D,R>
CombineWithLatestStreamId<T,D,R>combine(StreamId<T> trigger, StreamId<D> data, java.util.function.BiFunction<T,D,R> combiner)java.util.function.BiFunction<T,D,R>combiner()static <T,D>
CombineWithLatestStreamId<T,D,D>dataPropagated(StreamId<T> trigger, StreamId<D> data)StreamId<D>dataStream()booleanequals(java.lang.Object obj)inthashCode()java.lang.StringtoString()StreamId<T>triggerStream()
-
-
-
Method Detail
-
dataPropagated
public static <T,D> CombineWithLatestStreamId<T,D,D> dataPropagated(StreamId<T> trigger, StreamId<D> data)
-
combine
public static <T,D,R> CombineWithLatestStreamId<T,D,R> combine(StreamId<T> trigger, StreamId<D> data, java.util.function.BiFunction<T,D,R> combiner)
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-