rename
This commit is contained in:
parent
2e345a779e
commit
2251a20094
1 changed files with 2 additions and 2 deletions
|
@ -27,11 +27,11 @@ class Converters {
|
||||||
fun toSource(source: String?) = source?.let { Sources.fromString(it) }
|
fun toSource(source: String?) = source?.let { Sources.fromString(it) }
|
||||||
|
|
||||||
@TypeConverter
|
@TypeConverter
|
||||||
fun fromListOfXXXValueWithUnit(values: List<ValueWithUnit>): String = values.map(::ValueWithUnitWrapper)
|
fun fromListOfValueWithUnit(values: List<ValueWithUnit>): String = values.map(::ValueWithUnitWrapper)
|
||||||
.let(SealedClassHelper.gson::toJson)
|
.let(SealedClassHelper.gson::toJson)
|
||||||
|
|
||||||
@TypeConverter
|
@TypeConverter
|
||||||
fun toMutableListOfXXXValueWithUnit(string: String): List<ValueWithUnit> = SealedClassHelper.gson
|
fun toMutableListOfValueWithUnit(string: String): List<ValueWithUnit> = SealedClassHelper.gson
|
||||||
.fromJson<List<ValueWithUnitWrapper>>(string).map { it.wrapped }
|
.fromJson<List<ValueWithUnitWrapper>>(string).map { it.wrapped }
|
||||||
|
|
||||||
private class ValueWithUnitWrapper(val wrapped: ValueWithUnit)
|
private class ValueWithUnitWrapper(val wrapped: ValueWithUnit)
|
||||||
|
|
Loading…
Reference in a new issue