@Test public void testDouble() throws Exception { Double value; value = parseDouble("NaN"); assertTrue(value.equals(Double.NaN)); }
public static Double parseDouble(String target) { target = parseString(target); if (target == null) { return null; } Double value; try { value = new Double(target); } catch (NumberFormatException e) { if (target.equals(CALCULATE_ERROR)) { value = Double.NaN; } else if (target.equals(INFINITY)) { value = Double.POSITIVE_INFINITY; } else { value = null; } } return value; }
MZTabUtils { public static Double parseDouble(String target) { target = parseString(target); if (target == null) { return null; } Double value; try { value = new Double(target); } catch (NumberFormatException e) { if (target.equals(CALCULATE_ERROR)) { value = Double.NaN; } else if (target.equals(INFINITY)) { value = Double.POSITIVE_INFINITY; } else { value = null; } } return value; } }
MZTabUtils { public static Double parseDouble(String target) { target = parseString(target); if (target == null) { return null; } Double value; try { value = new Double(target); } catch (NumberFormatException e) { if (target.equals(CALCULATE_ERROR)) { value = Double.NaN; } else if (target.equals(INFINITY)) { value = Double.POSITIVE_INFINITY; } else { value = null; } } return value; }  }
MZTabUtils { public static Double parseDouble(String target) { target = parseString(target); if (target == null) { return null; } Double value; try { value = new Double(target); } catch (NumberFormatException e) { if (target.equals(CALCULATE_ERROR)) { value = Double.NaN; } else if (target.equals(INFINITY)) { value = Double.POSITIVE_INFINITY; } else { value = null; } } return value; }  static boolean isEmpty(String s); static String parseString(String target); static String printDouble(Double value); static Param parseParam(String target); static SplitList<String> parseStringList(char splitChar, String target); static SplitList<Param> parseParamList(String target); static SplitList<String> parseGOTermList(String target); static Integer parseInteger(String target); static Double parseDouble(String target); static SplitList<Double> parseDoubleList(String target); static String parseUnitId(String target); static URL parseURL(String target); static URI parseURI(String target); static SplitList<PublicationItem> parsePublicationItems(String target); static SplitList<SpecRef> parseSpecRefList(Unit unit, String target); static Modification parseModification(Section section, String target); static SplitList<Modification> parseModificationList(Section section, String target); }
MZTabUtils { public static Double parseDouble(String target) { target = parseString(target); if (target == null) { return null; } Double value; try { value = new Double(target); } catch (NumberFormatException e) { if (target.equals(CALCULATE_ERROR)) { value = Double.NaN; } else if (target.equals(INFINITY)) { value = Double.POSITIVE_INFINITY; } else { value = null; } } return value; }  static boolean isEmpty(String s); static String parseString(String target); static String printDouble(Double value); static Param parseParam(String target); static SplitList<String> parseStringList(char splitChar, String target); static SplitList<Param> parseParamList(String target); static SplitList<String> parseGOTermList(String target); static Integer parseInteger(String target); static Double parseDouble(String target); static SplitList<Double> parseDoubleList(String target); static String parseUnitId(String target); static URL parseURL(String target); static URI parseURI(String target); static SplitList<PublicationItem> parsePublicationItems(String target); static SplitList<SpecRef> parseSpecRefList(Unit unit, String target); static Modification parseModification(Section section, String target); static SplitList<Modification> parseModificationList(Section section, String target);  }