@Test public void testSecondsParser() { double testLatitude = 39.095973; double testLongitude = -94.573414; GeoPoint actual = JosmCoordinatesParser.parse("39\u00B0 05' 45.503\" -94\u00B0 34' 24.290\""); assertEquals("Failed to parse 39\u00B0 05' 45.503\" -94\u00B0 34' 24.290\"", testLatitude, actual.getLatitude(), 0.000001); assertEquals("Failed to parse 39\u00B0 05' 45.503\" -94\u00B0 34' 24.290\"", testLongitude, actual.getLongitude(), 0.000001); actual = JosmCoordinatesParser.parse("N39\u00B0 05' 45.503\" W94\u00B0 34' 24.290\""); assertEquals("Failed to parse N39\u00B0 05' 45.503\" W94\u00B0 34' 24.290\"", testLatitude, actual.getLatitude(), 0.000001); assertEquals("Failed to parse N39\u00B0 05' 45.503\" W94\u00B0 34' 24.290\"", testLongitude, actual.getLongitude(), 0.000001); actual = JosmCoordinatesParser.parse("39\u00B005'45.503\"N 94\u00B034'24.290\"W"); assertEquals("Failed to parse 39°05'45.503\"N 94°34'24.290\"W", testLatitude, actual.getLatitude(), 0.000001); assertEquals("Failed to parse 39°05'45.503\"N 94°34'24.290\"W", testLongitude, actual.getLongitude(), 0.000001); actual = JosmCoordinatesParser.parse("39 deg 05' 45.50\" N, 94 deg 34' 24.29\" W"); assertEquals("Failed to parse 39 deg 05' 45.50\" N, 94 deg 34' 24.29\" W", testLatitude, actual.getLatitude(), 0.000001); assertEquals("Failed to parse 39 deg 05' 45.50\" N, 94 deg 34' 24.29\" W", testLongitude, actual.getLongitude(), 0.000001); testLatitude = 39.095833; testLongitude = -94.573333; actual = JosmCoordinatesParser.parse("39\u00B005'45\" N 94\u00B034'24\" W"); assertEquals("Failed to parse 39\u00B005'45\" N 94\u00B034'24\" W", testLatitude, actual.getLatitude(), 0.000001); assertEquals("Failed to parse 39\u00B005'45\" N 94\u00B034'24\" W", testLongitude, actual.getLongitude(), 0.000001); actual = JosmCoordinatesParser.parse("39 5 45, -94 34 24"); assertEquals("Failed to parse 39 5 45, -94 34 24", testLatitude, actual.getLatitude(), 0.000001); assertEquals("Failed to parse 39 5 45, -94 34 24", testLongitude, actual.getLongitude(), 0.000001); }
@NonNull public static GeoPoint parse(@NonNull String input) throws IllegalArgumentException { Result result = parseWithResult(input); return result.coordinates; }
JosmCoordinatesParser { @NonNull public static GeoPoint parse(@NonNull String input) throws IllegalArgumentException { Result result = parseWithResult(input); return result.coordinates; } }
JosmCoordinatesParser { @NonNull public static GeoPoint parse(@NonNull String input) throws IllegalArgumentException { Result result = parseWithResult(input); return result.coordinates; } private  JosmCoordinatesParser(); }
JosmCoordinatesParser { @NonNull public static GeoPoint parse(@NonNull String input) throws IllegalArgumentException { Result result = parseWithResult(input); return result.coordinates; } private  JosmCoordinatesParser(); @NonNull static Result parseWithResult(@NonNull String input); @NonNull static GeoPoint parse(@NonNull String input); }
JosmCoordinatesParser { @NonNull public static GeoPoint parse(@NonNull String input) throws IllegalArgumentException { Result result = parseWithResult(input); return result.coordinates; } private  JosmCoordinatesParser(); @NonNull static Result parseWithResult(@NonNull String input); @NonNull static GeoPoint parse(@NonNull String input); static final String SOUTH; static final String NORTH; static final String WEST; static final String EAST; }