Class RecordingFunction<I,O>
- java.lang.Object
-
- com.g2forge.alexandria.java.function.tee.TeeFunction<I,O>
-
- com.g2forge.alexandria.java.function.tee.RecordingFunction<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>
public class RecordingFunction<I,O> extends TeeFunction<I,O>
Delegate to another function, and record all of the input and output value pairs.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.g2forge.alexandria.java.function.IFunction1
IFunction1.Identity<T>
-
-
Field Summary
Fields Modifier and Type Field Description protected Collection<ITuple2G_<? extends I,? extends O>>
record
A collection of the pairs of input and output values, for each invocation of this function.-
Fields inherited from class com.g2forge.alexandria.java.function.tee.TeeFunction
consumer, function
-
-
Constructor Summary
Constructors Constructor Description RecordingFunction(Function<I,O> function)
Create a new recording function, delegating to the specified function.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<ITuple2G_<? extends I,? extends O>>
getRecord()
A collection of the pairs of input and output values, for each invocation of this function.-
Methods inherited from class com.g2forge.alexandria.java.function.tee.TeeFunction
apply
-
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
-
-
-
-
Field Detail
-
record
protected final Collection<ITuple2G_<? extends I,? extends O>> record
A collection of the pairs of input and output values, for each invocation of this function.
-
-
Method Detail
-
getRecord
public Collection<ITuple2G_<? extends I,? extends O>> getRecord()
A collection of the pairs of input and output values, for each invocation of this function.- Returns:
- The record of function applications.
-
-