Class Lazy<T>

java.lang.Object
org.ethelred.util.function.Lazy<T>
Type Parameters:
T - The type that will be created and supplied
All Implemented Interfaces:
Supplier<T>

public class Lazy<T> extends Object implements Supplier<T>
NOT THREAD SAFE - intended to be used in single request scope
  • Method Details

    • lazy

      public static <V> Lazy<V> lazy(Supplier<V> supplier)
    • lazy

      public static <V, A> Lazy<V> lazy(A argument, Function<A,V> initializer)
    • lazy

      public static <V, A> Lazy<V> lazy(Supplier<A> argument, Function<A,V> initializer)
    • get

      public T get()
      Specified by:
      get in interface Supplier<T>