Class DerivedStreamId<S,​T>

  • Type Parameters:
    S - the type of the source stream
    T - 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 Detail

      • DerivedStreamId

        public DerivedStreamId​(StreamId<S> sourceStreamId,
                               java.util.function.Function<S,​T> conversion)
    • Method Detail

      • derive

        public static <S,​T> DerivedStreamId<S,​T> derive​(StreamId<S> sourceStreamId,
                                                                    java.util.function.Function<S,​T> conversion)
      • sourceStreamId

        public StreamId<S> sourceStreamId()
      • conversion

        public java.util.function.Function<S,​T> conversion()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object