Skip to content

v2.0

Compare
Choose a tag to compare
@osipxd osipxd released this 01 May 20:17
7101df3

ReactiveMap refactored

ReactiveMap renamed to ReactiveMutableMap.
There are two type parameters K (for keys), V (for values) instead of one T (for values), so you can use keys with a type different from String.

Now ReactiveMutableMap implements interface MutableMap.
Also, you can wrap Map with ReactiveMutableMap, using constructor.

Naming changes

Old versions of methods are marked with @Deprecated to help migrate to new naming.

Methods getAll replaced with field values to match Map interface.

Word stream in methods names replaced with implementation-specific words to make API clearer.

Coroutines:

  • getStreamgetFlow and getValueFlow
  • getAllStreamvaluesFlow
  • New field flow with the whole map

RxJava:

  • getStreamgetValueObservable
  • getAllStreamvaluesObservable
  • New field observable with the whole map

KAPT: 'IllegalStateException: Couldn't find declaration file' on delegate with inline getValue operator

There is a bug in Kotlin Compiler that affects MapMemory if you create subclasses - KT-46317.
You can use module mapmemory-kapt-bug-workaround as a workaround:

dependencies {
    implementation("com.redmadrobot.mapmemory:mapmemory-kapt-bug-workaround:[latest-version]")
}
- val someValue: String by memory
+ val someValue: String by memory.value()