Class LazyProvider<T>

  • All Implemented Interfaces:
    Provider<T>

    public final class LazyProvider<T>
    extends java.lang.Object
    implements Provider<T>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private @NotNull java.util.function.Supplier<@NotNull T> supplier  
      private T t  
    • Constructor Summary

      Constructors 
      Constructor Description
      LazyProvider​(@NotNull java.util.function.Supplier<@NotNull T> supplier)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T get()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • supplier

        @NotNull
        private final @NotNull java.util.function.Supplier<@NotNull T> supplier
      • t

        private T t
    • Constructor Detail

      • LazyProvider

        public LazyProvider​(@NotNull
                            @NotNull java.util.function.Supplier<@NotNull T> supplier)
    • Method Detail

      • get

        @NotNull
        public T get()
        Specified by:
        get in interface Provider<T>