Class Suppliers.ThreadSafeSupplier<T>

  • All Implemented Interfaces:
    Supplier<T>, java.io.Serializable, java.util.function.Supplier<T>
    Enclosing class:
    Suppliers

    private static class Suppliers.ThreadSafeSupplier<T>
    extends java.lang.Object
    implements Supplier<T>, java.io.Serializable
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T get()
      Retrieves an instance of the appropriate type.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ThreadSafeSupplier

        ThreadSafeSupplier​(Supplier<T> delegate)
    • Method Detail

      • get

        public T get()
        Description copied from interface: Supplier
        Retrieves an instance of the appropriate type. The returned object may or may not be a new instance, depending on the implementation.
        Specified by:
        get in interface Supplier<T>
        Specified by:
        get in interface java.util.function.Supplier<T>
        Returns:
        an instance of the appropriate type
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object