Packages

class ImmutableLRU[K, V] extends AnyRef

An immutable key/value store that evicts the least recently accessed elements to stay constrained in a maximum size bound.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ImmutableLRU
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def +(kv: (K, V)): (Option[K], ImmutableLRU[K, V])

    Build a new LRU containing the given key/value

    Build a new LRU containing the given key/value

    returns

    a tuple with of the following two items: _1 represents the evicted entry (if the given lru is at the maximum size) or None if the lru is not at capacity yet. _2 is the new lru with the given key/value pair inserted.

  4. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. def get(k: K): (Option[V], ImmutableLRU[K, V])

    If the key is present in the cache, returns the pair of Some(value) and the cache with the key's entry as the most recently accessed.

    If the key is present in the cache, returns the pair of Some(value) and the cache with the key's entry as the most recently accessed. Else, returns None and the unmodified cache.

  11. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. implicit val kOrd: Ordering[K]
    Attributes
    protected
  15. def keySet: Set[K]

    the Set of all keys in the LRU

    the Set of all keys in the LRU

    Note

    accessing this set does not update the element LRU ordering

  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  18. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. def remove(k: K): (Option[V], ImmutableLRU[K, V])

    If the key is present in the cache, returns the pair of Some(value) and the cache with the key removed.

    If the key is present in the cache, returns the pair of Some(value) and the cache with the key removed. Else, returns None and the unmodified cache.

  20. def size: Int

    the number of entries in the cache

  21. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  22. def toString(): String
    Definition Classes
    ImmutableLRU → AnyRef → Any
  23. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped