@Test public void getLocation() { JSON2DSources json2DSourcesWithLocation = new JSON2DSources(resolvedLocation, true); JSON2DSources json2DSourcesWoLocation = new JSON2DSources(resolvedLocation, false); Assert.assertArrayEquals(new Double[]{8.681495, 49.41461}, json2DSourcesWithLocation.getLocation()); Assert.assertArrayEquals(new Double[]{8.681495, 49.41461}, json2DSourcesWoLocation.getLocation()); }
@Override public Double[] getLocation() { Double[] location2D = new Double[2]; location2D[0] = FormatUtility.roundToDecimals(location.x, COORDINATE_DECIMAL_PLACES); location2D[1] = FormatUtility.roundToDecimals(location.y, COORDINATE_DECIMAL_PLACES); return location2D; }
JSON2DSources extends JSONLocation { @Override public Double[] getLocation() { Double[] location2D = new Double[2]; location2D[0] = FormatUtility.roundToDecimals(location.x, COORDINATE_DECIMAL_PLACES); location2D[1] = FormatUtility.roundToDecimals(location.y, COORDINATE_DECIMAL_PLACES); return location2D; } }
JSON2DSources extends JSONLocation { @Override public Double[] getLocation() { Double[] location2D = new Double[2]; location2D[0] = FormatUtility.roundToDecimals(location.x, COORDINATE_DECIMAL_PLACES); location2D[1] = FormatUtility.roundToDecimals(location.y, COORDINATE_DECIMAL_PLACES); return location2D; } JSON2DSources(ResolvedLocation source, boolean includeResolveLocations); }
JSON2DSources extends JSONLocation { @Override public Double[] getLocation() { Double[] location2D = new Double[2]; location2D[0] = FormatUtility.roundToDecimals(location.x, COORDINATE_DECIMAL_PLACES); location2D[1] = FormatUtility.roundToDecimals(location.y, COORDINATE_DECIMAL_PLACES); return location2D; } JSON2DSources(ResolvedLocation source, boolean includeResolveLocations); @Override Double[] getLocation(); }
JSON2DSources extends JSONLocation { @Override public Double[] getLocation() { Double[] location2D = new Double[2]; location2D[0] = FormatUtility.roundToDecimals(location.x, COORDINATE_DECIMAL_PLACES); location2D[1] = FormatUtility.roundToDecimals(location.y, COORDINATE_DECIMAL_PLACES); return location2D; } JSON2DSources(ResolvedLocation source, boolean includeResolveLocations); @Override Double[] getLocation();  }