X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=altoslib%2FAltosMag.java;h=e89ec0debf5742abff50960451dd0006b02b3493;hp=8d40bc607490f5392fff4c4eb5cc3f50573a396c;hb=51bdee662fdfad1937c576daadd2e5eacac17905;hpb=f7e2f7f430e612c682bf55478860054ce94b995f diff --git a/altoslib/AltosMag.java b/altoslib/AltosMag.java index 8d40bc60..e89ec0de 100644 --- a/altoslib/AltosMag.java +++ b/altoslib/AltosMag.java @@ -3,7 +3,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of @@ -20,7 +21,7 @@ package org.altusmetrum.altoslib_11; import java.util.concurrent.*; import java.io.*; -public class AltosMag implements Cloneable, AltosJsonable { +public class AltosMag implements Cloneable { public int along; public int across; public int through; @@ -93,28 +94,4 @@ public class AltosMag implements Cloneable, AltosJsonable { break; } } - - public AltosJson json() { - AltosJson j = new AltosJson(); - - j.put("along", along); - j.put("across", across); - j.put("through", through); - return j; - } - - public AltosMag(AltosJson j) { - this(); - - along = j.get_int("along", along); - across = j.get_int("across", across); - through = j.get_int("through", through); - } - - public static AltosMag fromJson(AltosJson j, AltosMag def) { - if (j == null) - return def; - - return new AltosMag(j); - } }