Class SupplierUtils

java.lang.Object
org.springframework.util.function.SupplierUtils

public abstract class SupplierUtils extends Object
Convenience utilities for Supplier handling.
Since:
5.1
Author:
Juergen Hoeller
See Also:
  • Constructor Details

    • SupplierUtils

      public SupplierUtils()
  • Method Details

    • resolve

      @Nullable public static <T> T resolve(@Nullable Supplier<T> supplier)
      Resolve the given Supplier, getting its result or immediately returning null if the supplier itself was null.
      Parameters:
      supplier - the supplier to resolve
      Returns:
      the supplier's result, or null if none