MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / getNumberFromList

Method getNumberFromList

ij/src/main/java/ij/util/Tools.java:404–406  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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;

Callers 6

setOptionsMethod · 0.95
saveMethod · 0.95
makeMarginValuesMethod · 0.95
makeRangeGetStepsMethod · 0.95

Calls 6

isDelimiterMethod · 0.95
parseDoubleMethod · 0.95
charAtMethod · 0.80
substringMethod · 0.80
lengthMethod · 0.65
indexOfMethod · 0.45

Tested by

no test coverage detected