Changeset 13210 in josm for trunk/src/org/openstreetmap/josm/data/gpx/ImmutableGpxTrack.java
- Timestamp:
- 2017-12-17T15:37:11+01:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/gpx/ImmutableGpxTrack.java
r12289 r13210 35 35 this.attr = Collections.unmodifiableMap(new HashMap<>(attributes)); 36 36 this.segments = Collections.unmodifiableList(newSegments); 37 this.length = calculateLength(); 38 this.bounds = calculateBounds(); 39 } 40 41 /** 42 * Constructs a new {@code ImmutableGpxTrack} from {@code GpxTrackSegment} objects. 43 * @param segments The segments to build the track from. Input is not deep-copied, 44 * which means the caller may reuse the same segments to build 45 * multiple ImmutableGpxTrack instances from. This should not be 46 * a problem, since this object cannot modify {@code this.segments}. 47 * @param attributes Attributes for the GpxTrack, the input map is copied. 48 * @since 13210 49 */ 50 public ImmutableGpxTrack(List<GpxTrackSegment> segments, Map<String, Object> attributes) { 51 this.attr = Collections.unmodifiableMap(new HashMap<>(attributes)); 52 this.segments = Collections.unmodifiableList(segments); 37 53 this.length = calculateLength(); 38 54 this.bounds = calculateBounds();
Note:
See TracChangeset
for help on using the changeset viewer.