v2.0
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:
getStream
→getFlow
andgetValueFlow
getAllStream
→valuesFlow
- New field
flow
with the whole map
RxJava:
getStream
→getValueObservable
getAllStream
→valuesObservable
- 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()