i want to let users edit a field with double data. I want to allow Double.NaN
(to void values). Is there a generic way (a predefined string) that is parsed to Double.NaN
from the method Double.valueOf(String)
without checking it in the background?
There is a special char looking like a diamond with a question mark in it (in HTML) that acts like NaN, but - well - the users wont find that on their keys.
You can pass +NaN
or -NaN
or NaN
to valueOf()
and have it return a NaN. The documentation gives the full details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With