org.bitbucket.inkytonik.kiama.util

Memoiser

class Memoiser[T, U] extends AnyRef

A memoiser that can store arbitrary values of type U under keys of type T. The behaviour of the memoiser can be adjusted by selecting an appropriate type.

Source
Memoiser.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Memoiser
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Memoiser(tipe: MemoiserType)

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def apply(t: T): U

    Get the value stored at key t or return null if no value.

  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def dup(t1: T, t2: T): Unit

    Duplicate an entry if possible.

    Duplicate an entry if possible. If t1 has a memoised value associated with it, set the value associated with t2 to the same value. If there is no value associated with t1, do nothing.

  10. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. def get(t: T): Option[U]

    Return the value stored at key t as an option.

  14. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  15. def getOrDefault(t: T, u: ⇒ U): U

    Return the value stored at key t if there is one, otherwise return u.

    Return the value stored at key t if there is one, otherwise return u. u is only evaluated if necessary.

  16. def hasBeenComputedAt(t: T): Boolean

    Has the value at t already been computed or not? By default, does the memo table contain a value for t?

  17. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  18. def image(t: T): U

    Get the value stored at key t or return null if no value.

  19. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  20. def keys: Vector[T]

    A view of the set of keys that are currently in this memo table.

  21. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  22. final def notify(): Unit

    Definition Classes
    AnyRef
  23. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  24. def put(t: T, u: U): Unit

    Store the value u under the key t.

  25. def putIfAbsent(t: T, u: U): Unit

    Store the value u under the key t if t does not already have an associated value.

  26. def reset(): Unit

    Immediately reset the memo table.

  27. def resetAt(t: T): Unit

    Immediately reset the memo table at t.

  28. def size(): Long

    The number of entries in the memo table.

  29. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  30. def toString(): String

    Definition Classes
    AnyRef → Any
  31. def updateAt(t: T, f: (U) ⇒ U, u: ⇒ U): Unit

    Update the value associated with t by applying f to it.

    Update the value associated with t by applying f to it. If there is no value currently associated with t, associate it with u. u is only evaluated if necessary.

  32. def values: Vector[U]

    A view of the set of values that are currently in this memo table.

  33. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped