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

        Way way = (Way) o;

        if (id != way.id) return false;
        if (Double.compare(way.price, price) != 0) return false;
        if (time != null ? !time.equals(way.time) : way.time != null) return false;

        return true;
    }