Class ConsumerWithDelegate<T>
java.lang.Object
space.jasan.support.groovy.closure.ConsumerWithDelegate<T>
- All Implemented Interfaces:
Consumer<T>
Utility for converting closure to consumer.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
static <T> Consumer<T>
create
(groovy.lang.Closure c) Create a consumer from a closure.static <T> Consumer<T>
create
(groovy.lang.Closure c, int strategy) Create a consumer from a closure.static <T> Consumer<T>
Create a consumer from a closure.static <T> Consumer<T>
Create a consumer from a closure.
-
Method Details
-
create
Create a consumer from a closure.- Type Parameters:
T
- the parameter- Parameters:
c
- the closureowner
- the ownerstrategy
- the strategy- Returns:
- the consumer
-
create
Create a consumer from a closure.- Type Parameters:
T
- the parameter- Parameters:
c
- the closureowner
- the owner- Returns:
- the consumer
-
create
Create a consumer from a closure.- Type Parameters:
T
- the parameter- Parameters:
c
- the closurestrategy
- the strategy- Returns:
- the consumer
-
create
Create a consumer from a closure.- Type Parameters:
T
- the parameter- Parameters:
c
- the closure- Returns:
- the consumer
-
accept
-