@Test public void testGetLineStrings() { List<GeoJsonLineString> lineStrings = new ArrayList<>(); lineStrings.add( new GeoJsonLineString( new ArrayList<>(Arrays.asList(new LatLng(0, 0), new LatLng(50, 50))))); lineStrings.add( new GeoJsonLineString( new ArrayList<>(Arrays.asList(new LatLng(80, 10), new LatLng(-54, 12.7))))); mls = new GeoJsonMultiLineString(lineStrings); assertEquals(lineStrings, mls.getLineStrings()); lineStrings = new ArrayList<>(); mls = new GeoJsonMultiLineString(lineStrings); assertEquals(new ArrayList<GeoJsonLineString>(), mls.getLineStrings()); try { mls = new GeoJsonMultiLineString(null); fail(); } catch (IllegalArgumentException e) { assertEquals("Geometries cannot be null", e.getMessage()); } }
public List<GeoJsonLineString> getLineStrings() { List<Geometry> geometryList = getGeometryObject(); ArrayList<GeoJsonLineString> geoJsonLineStrings = new ArrayList<GeoJsonLineString>(); for (Geometry geometry : geometryList) { GeoJsonLineString lineString = (GeoJsonLineString) geometry; geoJsonLineStrings.add(lineString); } return geoJsonLineStrings; }
GeoJsonMultiLineString extends MultiGeometry { public List<GeoJsonLineString> getLineStrings() { List<Geometry> geometryList = getGeometryObject(); ArrayList<GeoJsonLineString> geoJsonLineStrings = new ArrayList<GeoJsonLineString>(); for (Geometry geometry : geometryList) { GeoJsonLineString lineString = (GeoJsonLineString) geometry; geoJsonLineStrings.add(lineString); } return geoJsonLineStrings; } }
GeoJsonMultiLineString extends MultiGeometry { public List<GeoJsonLineString> getLineStrings() { List<Geometry> geometryList = getGeometryObject(); ArrayList<GeoJsonLineString> geoJsonLineStrings = new ArrayList<GeoJsonLineString>(); for (Geometry geometry : geometryList) { GeoJsonLineString lineString = (GeoJsonLineString) geometry; geoJsonLineStrings.add(lineString); } return geoJsonLineStrings; } GeoJsonMultiLineString(List<GeoJsonLineString> geoJsonLineStrings); }
GeoJsonMultiLineString extends MultiGeometry { public List<GeoJsonLineString> getLineStrings() { List<Geometry> geometryList = getGeometryObject(); ArrayList<GeoJsonLineString> geoJsonLineStrings = new ArrayList<GeoJsonLineString>(); for (Geometry geometry : geometryList) { GeoJsonLineString lineString = (GeoJsonLineString) geometry; geoJsonLineStrings.add(lineString); } return geoJsonLineStrings; } GeoJsonMultiLineString(List<GeoJsonLineString> geoJsonLineStrings); String getType(); List<GeoJsonLineString> getLineStrings(); }
GeoJsonMultiLineString extends MultiGeometry { public List<GeoJsonLineString> getLineStrings() { List<Geometry> geometryList = getGeometryObject(); ArrayList<GeoJsonLineString> geoJsonLineStrings = new ArrayList<GeoJsonLineString>(); for (Geometry geometry : geometryList) { GeoJsonLineString lineString = (GeoJsonLineString) geometry; geoJsonLineStrings.add(lineString); } return geoJsonLineStrings; } GeoJsonMultiLineString(List<GeoJsonLineString> geoJsonLineStrings); String getType(); List<GeoJsonLineString> getLineStrings();  }