@Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (hashCode() == o.hashCode()) return true;
        InhabitedPlanet that = (InhabitedPlanet) o;

        if (population != that.population) return false;
        if (spacePorts != null ? !spacePorts.equals(that.spacePorts) : that.spacePorts != null) return false;

        return true;
    }