@Test public void testCheckQuality() { assertTrue(wd.checkQuality("Y")); assertTrue(wd.checkQuality("N")); assertTrue(wd.checkQuality("S")); assertTrue(wd.checkQuality("F")); assertFalse(wd.checkQuality("I")); assertFalse(wd.checkQuality("")); }
public boolean checkQuality(String quality) { return (!quality.equals("") && ALLOWEDQUALITY.contains(quality)); }
WeatherData { public boolean checkQuality(String quality) { return (!quality.equals("") && ALLOWEDQUALITY.contains(quality)); } }
WeatherData { public boolean checkQuality(String quality) { return (!quality.equals("") && ALLOWEDQUALITY.contains(quality)); } WeatherData(LocalDateTime dateTime, String[] data); }
WeatherData { public boolean checkQuality(String quality) { return (!quality.equals("") && ALLOWEDQUALITY.contains(quality)); } WeatherData(LocalDateTime dateTime, String[] data); abstract String[] combineValues(); abstract Reading getReading(WeatherVar whichVariable); abstract boolean containsVar(WeatherVar variable); String rightAlign(String str, int intendedLength); boolean checkQuality(String quality); boolean checkParsable(String str); void alignCommonVariables(); String parseValue(Reading reading); }
WeatherData { public boolean checkQuality(String quality) { return (!quality.equals("") && ALLOWEDQUALITY.contains(quality)); } WeatherData(LocalDateTime dateTime, String[] data); abstract String[] combineValues(); abstract Reading getReading(WeatherVar whichVariable); abstract boolean containsVar(WeatherVar variable); String rightAlign(String str, int intendedLength); boolean checkQuality(String quality); boolean checkParsable(String str); void alignCommonVariables(); String parseValue(Reading reading); static final String ALLOWEDQUALITY; public String[] dataString; }