|
|
|
@ -36,19 +36,15 @@ data class BookChapter( |
|
|
|
|
var variable: String? = null //变量 |
|
|
|
|
) : Parcelable { |
|
|
|
|
|
|
|
|
|
@Ignore |
|
|
|
|
@delegate:Transient |
|
|
|
|
@delegate:Ignore |
|
|
|
|
@IgnoredOnParcel |
|
|
|
|
var variableMap: HashMap<String, String>? = null |
|
|
|
|
private set |
|
|
|
|
get() { |
|
|
|
|
if (field == null) { |
|
|
|
|
field = GSON.fromJsonObject<HashMap<String, String>>(variable) ?: HashMap() |
|
|
|
|
} |
|
|
|
|
return field |
|
|
|
|
val variableMap by lazy { |
|
|
|
|
GSON.fromJsonObject<HashMap<String, String>>(variable) ?: HashMap() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
fun putVariable(key: String, value: String) { |
|
|
|
|
variableMap?.put(key, value) |
|
|
|
|
variableMap[key] = value |
|
|
|
|
variable = GSON.toJson(variableMap) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|