Retrieves a number form a list of key-number pairs like "value1=1234.5 area=1.2e6". The "=" (if present) must be part of the 'key' string. Delimiters may be commas, semicolons or whitespace. There must be no whitespace between key and number. Returns Double.NaN if 'list' is null, if the key is no
(String list, String key)
| 402 | * There must be no whitespace between key and number. |
| 403 | * Returns Double.NaN if 'list' is null, if the key is not found, if the number is 'NaN' or invalid. */ |
| 404 | public static double getNumberFromList(String list, String key) { |
| 405 | return getNumberFromList(list, key, Double.NaN); |
| 406 | } |
| 407 | |
| 408 | public static double getNumberFromList(String list, String key, double defaultValue) { |
| 409 | if (list == null) return defaultValue; |
no test coverage detected