Class Lazy.Fast<T>

  • All Implemented Interfaces:
    java.util.function.Supplier<T>, Lazy<T>
    Enclosing interface:
    Lazy<T>

    public static final class Lazy.Fast<T>
    extends java.lang.Object
    implements Lazy<T>
    Non-thread-safe implementation.
    • Field Summary

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

      Constructors 
      Modifier Constructor Description
      private Fast​(java.util.function.Supplier<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

        private java.util.function.Supplier<T> supplier
      • instance

        private T instance
    • Constructor Detail

      • Fast

        private Fast​(java.util.function.Supplier<T> supplier)
    • Method Detail

      • get

        @Nullable
        public final T get()
        Specified by:
        get in interface java.util.function.Supplier<T>