Class TeeFunction<I,O>
- java.lang.Object
-
- com.g2forge.alexandria.java.function.tee.TeeFunction<I,O>
-
- Type Parameters:
I
- The input type.O
- The output type.
- All Implemented Interfaces:
IConsumer
,IConsumer1<I>
,IFunction<O>
,IFunction1<I,O>
,IFunctional
,IThrowConsumer1<I,RuntimeException>
,IThrowFunction1<I,O,RuntimeException>
,Consumer<I>
,Function<I,O>
- Direct Known Subclasses:
RecordingFunction
public class TeeFunction<I,O> extends Object implements IFunction1<I,O>
Delegate to another function, and for each invocation inform a consumer about both the input and output. Before mapping aStream
over this function, consider usingStream.peek(Consumer)
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.g2forge.alexandria.java.function.IFunction1
IFunction1.Identity<T>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description O
apply(I input)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.g2forge.alexandria.java.function.IConsumer1
andThen
-
Methods inherited from interface com.g2forge.alexandria.java.function.IFunction1
accept, andThen, applyWithFallback, compose, curry, lift, lift, noReturn, override, sync, toConsumer, toFunction, wrap
-
Methods inherited from interface com.g2forge.alexandria.java.function.IThrowFunction1
wrap
-
-