@Test public void testCheckParsable() { assertFalse(sd.checkParsable(null)); assertFalse(sd.checkParsable("")); assertFalse(sd.checkParsable("-")); assertFalse(sd.checkParsable("####")); assertTrue(sd.checkParsable("1234")); assertTrue(sd.checkParsable("3.0")); assertTrue(sd.checkParsable("012.345")); }
public boolean checkParsable(String str) { if (str == null || str.equals("")) return false; for (int i = 0; i < str.length(); i++) { if (!Character.isDigit(str.charAt(i)) && !(str.charAt(i) == '.')) { return false; } } return true; }
SolarData { public boolean checkParsable(String str) { if (str == null || str.equals("")) return false; for (int i = 0; i < str.length(); i++) { if (!Character.isDigit(str.charAt(i)) && !(str.charAt(i) == '.')) { return false; } } return true; } }
SolarData { public boolean checkParsable(String str) { if (str == null || str.equals("")) return false; for (int i = 0; i < str.length(); i++) { if (!Character.isDigit(str.charAt(i)) && !(str.charAt(i) == '.')) { return false; } } return true; } SolarData(String[] data);  SolarData(LocalDateTime dt, String[] data); }
SolarData { public boolean checkParsable(String str) { if (str == null || str.equals("")) return false; for (int i = 0; i < str.length(); i++) { if (!Character.isDigit(str.charAt(i)) && !(str.charAt(i) == '.')) { return false; } } return true; } SolarData(String[] data);  SolarData(LocalDateTime dt, String[] data); boolean checkParsable(String str); Reading getReading(SolarVar whichVariable); String[] combineValues(); }
SolarData { public boolean checkParsable(String str) { if (str == null || str.equals("")) return false; for (int i = 0; i < str.length(); i++) { if (!Character.isDigit(str.charAt(i)) && !(str.charAt(i) == '.')) { return false; } } return true; } SolarData(String[] data);  SolarData(LocalDateTime dt, String[] data); boolean checkParsable(String str); Reading getReading(SolarVar whichVariable); String[] combineValues();  }