Class Cache<T>

java.lang.Object
me.lucko.luckperms.common.cache.Cache<T>
Type Parameters:
T - the type being stored
Direct Known Subclasses:
Group.DisplayNameCache, WeightCache

public abstract class Cache<T> extends Object
Simple one element cache implementation.
  • Constructor Details

    • Cache

      public Cache()
  • Method Details

    • supply

      protected abstract @NonNull T supply()
    • get

      public final T get()
    • getIfPresent

      public final Optional<T> getIfPresent()
    • invalidate

      public final void invalidate()