-
- public AltosHashSet hashSet() {
- AltosHashSet h = new AltosHashSet();
-
- h.putDouble("distance", distance);
- h.putDouble("bearing", bearing);
- h.putDouble("range", range);
- h.putDouble("elevation", elevation);
-
- return h;
- }
-
- public AltosJson json() {
- AltosJson j = new AltosJson();
-
- j.put("distance", distance);
- j.put("bearing", bearing);
- j.put("range", range);
- j.put("elevation", elevation);
-
- return j;
- }
-
- public AltosGreatCircle(AltosHashSet h) {
- this();
-
- distance = h.getDouble("distance", distance);
- bearing = h.getDouble("bearing", bearing);
- range = h.getDouble("range", range);
- elevation = h.getDouble("elevation", elevation);
- }
-
- public static AltosGreatCircle fromHashSet(AltosHashSet h, AltosGreatCircle def) {
- if (h == null)
- return def;
-
- return new AltosGreatCircle(h);
- }
-
- public AltosGreatCircle(AltosJson j) {
- this();
-
- distance = j.get_double("distance", distance);
- bearing = j.get_double("bearing", bearing);
- range = j.get_double("range", range);
- elevation = j.get_double("elevation", elevation);
- }
-
- public static AltosGreatCircle fromJson(AltosJson j, AltosGreatCircle def) {
- if (j == null)
- return def;
-
- return new AltosGreatCircle(j);
- }