Interface Supplied<T>

Type Parameters:
T - the supplied value type

public interface Supplied<T>
A supplied value.
Author:
Paul Ferraro
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Supplied<?>
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T> Supplied<T>
    A cached supplied value.
    get(Supplier<T> factory)
    Returns the supplied value, created from the specified factory if necessary.
    static <T> Supplied<T>
    A simple supplied value.
  • Field Details

    • SIMPLE

      static final Supplied<?> SIMPLE
  • Method Details

    • get

      T get(Supplier<T> factory)
      Returns the supplied value, created from the specified factory if necessary.
      Parameters:
      factory - a value supplier
      Returns:
      the supplied value
    • cached

      static <T> Supplied<T> cached()
      A cached supplied value.
      Type Parameters:
      T - the supplied value type
      Returns:
      the supplied or cached value
    • simple

      static <T> Supplied<T> simple()
      A simple supplied value.
      Type Parameters:
      T -
      Returns:
      the supplied value