fixed: Test.java
1 parent f4aa1e5 commit f08f62c711e994337ce18a0ea0d1f450159d421a
@haya4 haya4 authored on 25 Apr 2020
Showing 1 changed file
View
2
■■■
src/main/java/osm/jp/gpx/TagTrkpt.java
b =(TagTrkpt)super.clone();
//親クラスのcloneメソッドで深いコピー(複製先のクラス型変数と複製元のクラス型変数で指しているインスタンスの中身が違うコピー)がなされていないクラス型変数をその変数のcloneメソッドで複製し、複製先のクラス型変数に代入
b.lat = this.lat;
b.lon = this.lon;
b.eleStr = this.eleStr.toString();
b.eleStr = (this.eleStr == null ? null : this.eleStr.toString());
b.time = (Date) this.time.clone();
b.magvarStr = (this.magvarStr==null ? null : this.magvarStr.toString());
b.speedStr = (this.speedStr == null ? null : this.speedStr.toString());
} catch (Exception e){