@Test public void testGetReading() { assertTrue(wd.getReading(WeatherVar.values()[0]).varName.equals("Precipitation")); assertTrue(wd.getReading(WeatherVar.values()[1]).varName.equals("Air temperature")); assertTrue(wd.getReading(WeatherVar.values()[2]).varName.equals("Wet bulb temperature")); assertTrue(wd.getReading(WeatherVar.values()[3]).varName.equals("Dew point temperature")); assertTrue(wd.getReading(WeatherVar.values()[4]).varName.equals("Humidity")); assertTrue(wd.getReading(WeatherVar.values()[5]).varName.equals("Vapour pressure")); assertTrue(wd.getReading(WeatherVar.values()[6]).varName.equals("Saturated vapour pressure")); assertTrue(wd.getReading(WeatherVar.values()[7]).varName.equals("Wind speed")); assertTrue(wd.getReading(WeatherVar.values()[8]).varName.equals("Wind direction")); assertTrue(wd.getReading(WeatherVar.values()[9]).varName.equals("Wind gust")); assertTrue(wd.getReading(WeatherVar.values()[10]).varName.equals("Sea level pressure")); }
public abstract Reading getReading(WeatherVar whichVariable);
WeatherData { public abstract Reading getReading(WeatherVar whichVariable); }
WeatherData { public abstract Reading getReading(WeatherVar whichVariable); WeatherData(LocalDateTime dateTime, String[] data); }
WeatherData { public abstract Reading getReading(WeatherVar whichVariable); 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 abstract Reading getReading(WeatherVar whichVariable); 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; }