source: josm/trunk/src/org/openstreetmap/josm/data/gpx/GpxRoute.java@ 12156

Last change on this file since 12156 was 10906, checked in by Don-vip, 8 years ago

add more non-regression NMEA unit tests

  • Property svn:eol-style set to native
File size: 898 bytes
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.data.gpx;
3
4import java.util.Collection;
5import java.util.LinkedList;
6
7public class GpxRoute extends WithAttributes {
8 public Collection<WayPoint> routePoints = new LinkedList<>();
9
10 @Override
11 public int hashCode() {
12 return 31 * super.hashCode() + ((routePoints == null) ? 0 : routePoints.hashCode());
13 }
14
15 @Override
16 public boolean equals(Object obj) {
17 if (this == obj)
18 return true;
19 if (!super.equals(obj))
20 return false;
21 if (getClass() != obj.getClass())
22 return false;
23 GpxRoute other = (GpxRoute) obj;
24 if (routePoints == null) {
25 if (other.routePoints != null)
26 return false;
27 } else if (!routePoints.equals(other.routePoints))
28 return false;
29 return true;
30 }
31}
Note: See TracBrowser for help on using the repository browser.