Class stl_OutputCache<I,​O>

java.lang.Object
com.jackmeng.stl.stl_OutputCache<I,​O>

public class stl_OutputCache<I,​O>
extends java.lang.Object
  • Field Summary

    Fields
    Modifier and Type Field Description
    private java.util.Map<I,​O> cache  
    private java.util.function.Function<I,​O> function  
  • Constructor Summary

    Constructors
    Constructor Description
    stl_OutputCache​(java.util.function.Function<I,​O> function)  
  • Method Summary

    Modifier and Type Method Description
    void clearCache()  
    O get​(I input)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • function

      private final java.util.function.Function<I,​O> function
    • cache

      private final java.util.Map<I,​O> cache
  • Constructor Details

    • stl_OutputCache

      public stl_OutputCache​(java.util.function.Function<I,​O> function)
  • Method Details

    • get

      public O get​(I input)
    • clearCache

      public void clearCache()