extra fields for something-props

This commit is contained in:
minjaesong
2021-09-06 10:39:31 +09:00
parent 6b86f65681
commit ec08f8d07e
9 changed files with 46 additions and 8 deletions

View File

@@ -46,8 +46,6 @@ open class KVHashMap {
if (value == null) return null
// if (value is JsonPrimitive) return value.asInt
return value as Int
}
@@ -58,12 +56,17 @@ open class KVHashMap {
if (value is Int)
return value.toDouble()
// else if (value is JsonPrimitive) return value.asDouble
return value as Double
}
fun getAsFloat(key: String): Float? {
val value = get(key)
if (value == null) return null
if (value is Float) return value as Float
return getAsDouble(key)?.toFloat()
}
@@ -72,8 +75,6 @@ open class KVHashMap {
if (value == null) return null
// if (value is JsonPrimitive) return value.asString
return value as String
}
@@ -82,8 +83,6 @@ open class KVHashMap {
if (value == null) return null
// if (value is JsonPrimitive) return value.asBoolean
return value as Boolean
}