예제 #1
0
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null) return false;
   if (getClass() != obj.getClass()) return false;
   Weather other = (Weather) obj;
   if (location == null) {
     if (other.location != null) return false;
   } else if (!location.equals(other.location)) return false;
   if (observationTime == null) {
     if (other.observationTime != null) return false;
   } else if (!observationTime.equals(other.observationTime)) return false;
   if (relativeHumidity == null) {
     if (other.relativeHumidity != null) return false;
   } else if (!relativeHumidity.equals(other.relativeHumidity)) return false;
   if (temperature == null) {
     if (other.temperature != null) return false;
   } else if (!temperature.equals(other.temperature)) return false;
   if (weatherDescription == null) {
     if (other.weatherDescription != null) return false;
   } else if (!weatherDescription.equals(other.weatherDescription)) return false;
   if (windDescription == null) {
     if (other.windDescription != null) return false;
   } else if (!windDescription.equals(other.windDescription)) return false;
   if (windDirection == null) {
     if (other.windDirection != null) return false;
   } else if (!windDirection.equals(other.windDirection)) return false;
   return true;
 }