com.ibm.tivoli.maximo.util

Class Supplier.Factory

  • java.lang.Object
    • com.ibm.tivoli.maximo.util.Supplier.Factory
  • Enclosing interface:
    Supplier


    public static class Supplier.Factory
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor and Description
      Factory() 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static Supplier cache(Supplier in)
      Creates a supplier that defers creating the object until it is needed, and then will always return the same object for future calls to get().
      static Supplier forObject(java.lang.Object in)
      Creates a supplier that always returns the given object.
      • Methods inherited from class java.lang.Object

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

      • Factory

        public Factory()
    • Method Detail

      • forObject

        public static Supplier forObject(java.lang.Object in)
        Creates a supplier that always returns the given object.
        Parameters:
        in -
        Returns:
      • cache

        public static Supplier cache(Supplier in)
        Creates a supplier that defers creating the object until it is needed, and then will always return the same object for future calls to get().
        Parameters:
        in -
        Returns: