package observer;
import java.util.AbstractMap;
import java.util.Map;
public class Hobbits {
private Logger logger;
private Map.Entry<Integer, String> value = new AbstractMap.SimpleEntry<>(1,"hobbits");
public void updateWeather(int weather) {
Map.Entry<Integer, String> temp_if23;
if ((weather==this.value.getKey())) {
temp_if23 = this.value;
} else {
return;
}
value = temp_if23;
this.logger.updateHobbits(value);
}
public Hobbits(Logger logger) {
this.logger = logger;
}
public void update(String type, int id) {
this.value = new AbstractMap.SimpleEntry<>(id, type);
this.logger.updateHobbits(value);
this.logger.updateHobbits(value);
}
public Map.Entry<Integer, String> getValue() {
return value;
}
}