Skip to content

Commit

Permalink
Add some stuff from #865 and #820 that didn't get into RoutingRequest…
Browse files Browse the repository at this point in the history
….equals and hashCode.
  • Loading branch information
mattwigway committed Dec 27, 2012
1 parent 4566501 commit cefb418
Showing 1 changed file with 12 additions and 2 deletions.
Expand Up @@ -738,7 +738,12 @@ && getModes().equals(other.getModes())
&& useBikeRentalAvailabilityInformation == other.useBikeRentalAvailabilityInformation
&& extensions.equals(other.extensions)
&& clampInitialWait == other.clampInitialWait
&& reverseOptimizeOnTheFly == other.reverseOptimizeOnTheFly;
&& reverseOptimizeOnTheFly == other.reverseOptimizeOnTheFly
&& carAccelerationSpeed == other.carAccelerationSpeed
&& carDecelerationSpeed == other.carDecelerationSpeed
&& bikeParkingTime == other.bikeParkingTime
&& needToParkBike == other.needToParkBike
&& driveOnRight == other.driveOnRight;
}

/** Equality and hashCode should not consider the routing context, to allow SPT caching. */
Expand All @@ -759,7 +764,12 @@ public int hashCode() {
+ new Double(triangleTimeFactor).hashCode() * 790052899
+ new Double(stairsReluctance).hashCode() * 315595321
+ new Long(clampInitialWait).hashCode() * 209477
+ new Boolean(reverseOptimizeOnTheFly).hashCode() * 95112799;
+ new Boolean(reverseOptimizeOnTheFly).hashCode() * 95112799
+ new Double(carAccelerationSpeed).hashCode() * 3181
+ new Double(carDecelerationSpeed).hashCode() * 3547
+ new Boolean(driveOnRight).hashCode() * 32993
+ bikeParkingTime * 180811
+ new Boolean(needToParkBike).hashCode() * 28657;
if (batch) {
hashCode *= -1;
// batch mode, only one of two endpoints matters
Expand Down

0 comments on commit cefb418

Please sign in to comment.