Class CachedSupplier<T>

java.lang.Object
org.kingdoms.utils.cache.CachedSupplier<T>
All Implemented Interfaces:
Supplier<T>

public class CachedSupplier<T> extends Object implements Supplier<T>
  • Field Details

    • supplier

      protected final Supplier<T> supplier
    • cached

      protected T cached
    • present

      protected Boolean present
  • Constructor Details

    • CachedSupplier

      public CachedSupplier(Supplier<T> supplier)
  • Method Details

    • contains

      public boolean contains(T obj)
    • isPresent

      public boolean isPresent()
    • get

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