Documentation / dataflow / com.femastudios.dataflow.extensions / asStringF
Go to reference

asStringF

fun MutableField<Double>.asStringF(fallbackOnError: (String) -> Double = { 0.0 }): MutableField<String>

Returns a new MutableField whose value is the string representation of the value of this MutableField.

When you change the value of the returned MutableField, changes are propagated back to the source. If the returned MutableField is changed in a String that is not a valid Double representation, the fallbackOnError function is called. By default, it returns 0.0


fun MutableField<Float>.asStringF(fallbackOnError: (String) -> Float = { 0F }): MutableField<String>

Returns a new MutableField whose value is the string representation of the value of this MutableField.

When you change the value of the returned MutableField, changes are propagated back to the source. If the returned MutableField is changed in a String that is not a valid Float representation, the fallbackOnError function is called. By default, it returns 0F


fun MutableField<Int>.asStringF(fallbackOnError: (String) -> Int = { 0 }): MutableField<String>

Returns a new MutableField whose value is the string representation of the value of this MutableField.

When you change the value of the returned MutableField, changes are propagated back to the source. If the returned MutableField is changed in a String that is not a valid Int representation, the fallbackOnError function is called. By default, it returns 0


fun MutableField<Long>.asStringF(fallbackOnError: (String) -> Long = { 0L }): MutableField<String>

Returns a new MutableField whose value is the string representation of the value of this MutableField.

When you change the value of the returned MutableField, changes are propagated back to the source. If the returned MutableField is changed in a String that is not a valid Long representation, the fallbackOnError function is called. By default, it returns 0L