@Test public void testStation() { Station s = new Station(name, desc, wmo, lat, lon, alt, 99); Station sb = Station.builder("name").setName(name).setDescription(desc).setWmoId(wmo).setLatitude(lat) .setLongitude(lon).setAltitude(alt).setNobs(99).build(); assertThat(s).isEqualTo(sb); assertThat(s.hashCode()).isEqualTo(sb.hashCode()); assertThat(s.getName()).isEqualTo(name); assertThat(s.getDescription()).isEqualTo(desc); assertThat(s.getWmoId()).isEqualTo(wmo); assertThat(s.getNobs()).isEqualTo(99); assertThat(s.getLatitude()).isEqualTo(lat); assertThat(s.getLongitude()).isEqualTo(lon); assertThat(s.getAltitude()).isEqualTo(alt); assertThat(s.getAltitudeUnits()).isEqualTo(null); assertThat(s.isMissing()).isFalse(); }
public Station(String name, String desc, String wmoId, double lat, double lon, double alt, int nobs) { super(lat, lon, alt, null); this.name = name; this.desc = desc; this.wmoId = wmoId; this.nobs = nobs; }
Station extends EarthLocation implements Comparable<Station> { public Station(String name, String desc, String wmoId, double lat, double lon, double alt, int nobs) { super(lat, lon, alt, null); this.name = name; this.desc = desc; this.wmoId = wmoId; this.nobs = nobs; } }
Station extends EarthLocation implements Comparable<Station> { public Station(String name, String desc, String wmoId, double lat, double lon, double alt, int nobs) { super(lat, lon, alt, null); this.name = name; this.desc = desc; this.wmoId = wmoId; this.nobs = nobs; } Station(String name, String desc, String wmoId, double lat, double lon, double alt, int nobs); private  Station(Builder builder); }
Station extends EarthLocation implements Comparable<Station> { public Station(String name, String desc, String wmoId, double lat, double lon, double alt, int nobs) { super(lat, lon, alt, null); this.name = name; this.desc = desc; this.wmoId = wmoId; this.nobs = nobs; } Station(String name, String desc, String wmoId, double lat, double lon, double alt, int nobs); private  Station(Builder builder); String getName(); @Nullable String getDescription(); @Nullable String getWmoId(); int getNobs(); @Override int compareTo(Station so); static Builder builder(String name); }
Station extends EarthLocation implements Comparable<Station> { public Station(String name, String desc, String wmoId, double lat, double lon, double alt, int nobs) { super(lat, lon, alt, null); this.name = name; this.desc = desc; this.wmoId = wmoId; this.nobs = nobs; } Station(String name, String desc, String wmoId, double lat, double lon, double alt, int nobs); private  Station(Builder builder); String getName(); @Nullable String getDescription(); @Nullable String getWmoId(); int getNobs(); @Override int compareTo(Station so); static Builder builder(String name);  }