android :: SharedPreferences :: add_float
Float
Returns self allowing fluent programming
self
Be aware of possible loss of precision as Nit Float corresponds to Java double and the methods stores a Java float
double
float
# Set a key-value pair using a `Float` value # Returns `self` allowing fluent programming # # Be aware of possible loss of precision as Nit `Float` corresponds to Java `double` # and the methods stores a Java `float` fun add_float(key: String, value: Float): SharedPreferences do sys.jni_env.push_local_frame(1) editor.put_float(key.to_java_string, value) sys.jni_env.pop_local_frame commit_if_auto return self end