Class Closure<T>

java.lang.Object
net.officefloor.frame.test.Closure<T>
All Implemented Interfaces:
Consumer<T>

public class Closure<T> extends Object implements Consumer<T>
Captures a free variable for closure state of a Function.
Author:
Daniel Sagenschneider
  • Field Details

    • value

      public T value
      Closure free variable value.
  • 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>