Class DerivedStreamId<S,T>
- java.lang.Object
-
- org.streamingpool.core.service.streamid.DerivedStreamId<S,T>
-
- Type Parameters:
S- the type of the source streamT- the type of the final stream
- All Implemented Interfaces:
java.io.Serializable,StreamId<T>
public class DerivedStreamId<S,T> extends java.lang.Object implements StreamId<T>, java.io.Serializable
A stream id, that applies the provided function to transform the elements of the data stream. It is much like a map operator, but the operation is specified before the actual stream is created or discovered.- See Also:
DerivedStreamFactory, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DerivedStreamId(StreamId<S> sourceStreamId, java.util.function.Function<S,T> conversion)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.function.Function<S,T>conversion()static <S,T>
DerivedStreamId<S,T>derive(StreamId<S> sourceStreamId, java.util.function.Function<S,T> conversion)booleanequals(java.lang.Object obj)inthashCode()StreamId<S>sourceStreamId()java.lang.StringtoString()
-
-
-
Method Detail
-
derive
public static <S,T> DerivedStreamId<S,T> derive(StreamId<S> sourceStreamId, java.util.function.Function<S,T> conversion)
-
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
-
-