Skip to content

Add hashCode and equals method to StopTime.java#315

Merged
evansiroky merged 2 commits intodevfrom
add-stoptime-hash
May 2, 2021
Merged

Add hashCode and equals method to StopTime.java#315
evansiroky merged 2 commits intodevfrom
add-stoptime-hash

Conversation

@landonreed
Copy link
Copy Markdown
Contributor

@landonreed landonreed commented Apr 29, 2021

Checklist

  • Appropriate branch selected (all PRs must first be merged to dev before they can be merged to master)
  • Any modified or new methods or classes have helpful JavaDoc and code is thoroughly commented
  • The description lists all applicable issues this PR seeks to resolve
  • The description lists any configuration setting(s) that differ from the default settings
  • All tests and CI builds passing

Description

Adds hashcode and equals method for use in ibi-group/datatools-server#376

Copy link
Copy Markdown
Contributor

@evansiroky evansiroky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some lines are too long.

if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
StopTime stopTime = (StopTime) o;
return arrival_time == stopTime.arrival_time && departure_time == stopTime.departure_time && stop_sequence == stopTime.stop_sequence && pickup_type == stopTime.pickup_type && drop_off_type == stopTime.drop_off_type && Double.compare(stopTime.shape_dist_traveled, shape_dist_traveled) == 0 && timepoint == stopTime.timepoint && Objects.equals(trip_id, stopTime.trip_id) && Objects.equals(stop_id, stopTime.stop_id) && Objects.equals(stop_headsign, stopTime.stop_headsign);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line too long.


@Override
public int hashCode() {
return Objects.hash(trip_id, arrival_time, departure_time, stop_id, stop_sequence, stop_headsign, pickup_type, drop_off_type, shape_dist_traveled, timepoint);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line too long.

@evansiroky evansiroky assigned landonreed and unassigned evansiroky Apr 29, 2021
Copy link
Copy Markdown
Collaborator

@binh-dam-ibigroup binh-dam-ibigroup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conditional approval on resolving @evansiroky's comments.

@binh-dam-ibigroup binh-dam-ibigroup removed their assignment Apr 29, 2021
@landonreed landonreed requested a review from evansiroky April 30, 2021 12:57
@landonreed landonreed assigned evansiroky and unassigned landonreed Apr 30, 2021
@evansiroky evansiroky merged commit a9eb787 into dev May 2, 2021
@landonreed landonreed mentioned this pull request May 3, 2021
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants