Last change
on this file since 12867 was 12186, checked in by michael2402, 7 years ago |
See #14794: Add javadoc for all gpx classes.
|
-
Property svn:eol-style
set to
native
|
File size:
1.1 KB
|
Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.data.gpx;
|
---|
3 |
|
---|
4 | import java.util.Collection;
|
---|
5 | import java.util.LinkedList;
|
---|
6 |
|
---|
7 | /**
|
---|
8 | * A route is a part of a GPX file containing of multiple GPX points.
|
---|
9 | */
|
---|
10 | public class GpxRoute extends WithAttributes {
|
---|
11 | /**
|
---|
12 | * The points this route consists of. Should not be changed after creation.
|
---|
13 | * <p>
|
---|
14 | * This collection is ordered.
|
---|
15 | */
|
---|
16 | public Collection<WayPoint> routePoints = new LinkedList<>();
|
---|
17 |
|
---|
18 | @Override
|
---|
19 | public int hashCode() {
|
---|
20 | return 31 * super.hashCode() + ((routePoints == null) ? 0 : routePoints.hashCode());
|
---|
21 | }
|
---|
22 |
|
---|
23 | @Override
|
---|
24 | public boolean equals(Object obj) {
|
---|
25 | if (this == obj)
|
---|
26 | return true;
|
---|
27 | if (!super.equals(obj))
|
---|
28 | return false;
|
---|
29 | if (getClass() != obj.getClass())
|
---|
30 | return false;
|
---|
31 | GpxRoute other = (GpxRoute) obj;
|
---|
32 | if (routePoints == null) {
|
---|
33 | if (other.routePoints != null)
|
---|
34 | return false;
|
---|
35 | } else if (!routePoints.equals(other.routePoints))
|
---|
36 | return false;
|
---|
37 | return true;
|
---|
38 | }
|
---|
39 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.