Class FunctionWithDescription<T,R>
- java.lang.Object
-
- dev.aherscu.qa.jgiven.commons.utils.FunctionWithDescription<T,R>
-
- Type Parameters:
T
- the type of inputR
- the type of output
- All Implemented Interfaces:
DescriptionFormatter.HasDescription
,Function<T,R>
public class FunctionWithDescription<T,R> extends Object implements DescriptionFormatter.HasDescription, Function<T,R>
Wraps aFunction
with a description.- Author:
- Adrian Herscu
-
-
Constructor Summary
Constructors Constructor Description FunctionWithDescription(String description, Function<T,R> functor)
-
-
-
Constructor Detail
-
FunctionWithDescription
public FunctionWithDescription(String description, Function<T,R> functor)
- Parameters:
description
- the descriptionfunctor
- the wrappedUnaryOperator
-
-
Method Detail
-
description
public String description()
- Specified by:
description
in interfaceDescriptionFormatter.HasDescription
- Returns:
- the description text
-
-