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.
- Alphabetic
- By Inheritance
- ImmutableLRU
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
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.
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
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.
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
implicit
val
kOrd: Ordering[K]
- Attributes
- protected
-
def
keySet: Set[K]
the
Setof all keys in the LRUthe
Setof all keys in the LRU- Note
accessing this set does not update the element LRU ordering
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
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.
-
def
size: Int
the number of entries in the cache
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- ImmutableLRU → AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )