Package io.kjson.util

Class Cache

  • All Implemented Interfaces:

    
    public final class Cache<K extends Object, V extends Object>
    
                        

    A general-purpose cache that stores a value the first time it is created.

    Author:

    Peter Wall

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
      Cache(Function1<K, V> init)
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final V get(K key)
      final V remove(K key)
      final Unit clear()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Cache

        Cache(Function1<K, V> init)