Class SupplierAdapter<T>

java.lang.Object
io.github.mmm.code.impl.java.supplier.SupplierAdapter<T>
Type Parameters:
T - type of the supplied object to get.
All Implemented Interfaces:
Supplier<T>

@Deprecated public class SupplierAdapter<T> extends Object implements Supplier<T>
Deprecated.
do not use externally. Will most probably be moved (maybe even to mmm-util-*).
Implementation of Supplier that will remember the provided object and therefore prevents expensive (lazy) evaluation from being executed more than once.
Since:
1.0.0
Author:
Joerg Hohwiller (hohwille at users.sourceforge.net)
  • Constructor Details

    • SupplierAdapter

      public SupplierAdapter(Supplier<T> supplier)
      Deprecated.
      The constructor.
      Parameters:
      supplier - the raw Supplier to adapt.
    • SupplierAdapter

      public SupplierAdapter(T object)
      Deprecated.
      The constructor.
      Parameters:
      object - the actual object to wrap.
  • Method Details

    • get

      public T get()
      Deprecated.
      Specified by:
      get in interface Supplier<T>