LOG121_TP01/src/metadata/WarehouseMetadata.java
2022-06-07 21:07:49 -04:00

41 lines
1015 B
Java

package metadata;
import simulation.BuildingState;
import java.util.Map;
import java.util.Objects;
public class WarehouseMetadata extends BuildingMetadata {
private final WarehouseInput input;
public WarehouseMetadata(String type, Map<BuildingState, String> iconsPaths, WarehouseInput input) {
super(type, iconsPaths);
this.input = input;
}
public WarehouseInput getInput() {
return input;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
WarehouseMetadata that = (WarehouseMetadata) o;
return input.equals(that.input);
}
@Override
public int hashCode() {
return Objects.hash(super.hashCode(), input);
}
@Override
public String toString() {
return "WarehouseMetadata{" +
"input=" + input +
"} " + super.toString();
}
}