- All Implemented Interfaces:
Consumer<T>
Captures a free variable for closure state of a
Function.
- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors
Initialise with initial value.
-
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Details
-
Closure
public Closure()
Initialise with null.
-
Closure
public Closure(T initialValue)
Initialise with initial value.
- Parameters:
initialValue - Initial value.
-
Method Details
-
accept
public void accept(T value)
- Specified by:
accept in interface Consumer<T>