Class CachedFunction<T,​R>

  • All Implemented Interfaces:
    Function<T,​R>

    public class CachedFunction<T,​R>
    extends Object
    implements Function<T,​R>
    • Constructor Detail

      • CachedFunction

        public CachedFunction​(Function<T,​R> innerFunction)
    • Method Detail

      • getKnown

        public R getKnown​(T preimage)
      • apply

        public R apply​(T t)
        Specified by:
        apply in interface Function<T,​R>
      • replace

        public void replace​(T preimage,
                            R value)
      • invalidate

        public void invalidate​(T preimage)
      • caches

        public boolean caches​(T preimage)
      • getCachedPreimages

        public Collection<T> getCachedPreimages()