@Test public void fromJson_coordinatesPresent() throws Exception { thrown.expect(NullPointerException.class); MultiPolygon.fromJson("{\"type\":\"MultiPolygon\",\"coordinates\":null}"); }
public static MultiPolygon fromJson(String json) { GsonBuilder gson = new GsonBuilder(); gson.registerTypeAdapterFactory(GeoJsonAdapterFactory.create()); return gson.create().fromJson(json, MultiPolygon.class); }
MultiPolygon implements CoordinateContainer<List<List<List<Point>>>> { public static MultiPolygon fromJson(String json) { GsonBuilder gson = new GsonBuilder(); gson.registerTypeAdapterFactory(GeoJsonAdapterFactory.create()); return gson.create().fromJson(json, MultiPolygon.class); } }
MultiPolygon implements CoordinateContainer<List<List<List<Point>>>> { public static MultiPolygon fromJson(String json) { GsonBuilder gson = new GsonBuilder(); gson.registerTypeAdapterFactory(GeoJsonAdapterFactory.create()); return gson.create().fromJson(json, MultiPolygon.class); } MultiPolygon(String type, @Nullable BoundingBox bbox, List<List<List<Point>>> coordinates); }
MultiPolygon implements CoordinateContainer<List<List<List<Point>>>> { public static MultiPolygon fromJson(String json) { GsonBuilder gson = new GsonBuilder(); gson.registerTypeAdapterFactory(GeoJsonAdapterFactory.create()); return gson.create().fromJson(json, MultiPolygon.class); } MultiPolygon(String type, @Nullable BoundingBox bbox, List<List<List<Point>>> coordinates); static MultiPolygon fromJson(String json); static MultiPolygon fromPolygons(@NonNull List<Polygon> polygons); static MultiPolygon fromPolygons(@NonNull List<Polygon> polygons,
                                          @Nullable BoundingBox bbox); static MultiPolygon fromPolygon(@NonNull Polygon polygon); static MultiPolygon fromPolygon(@NonNull Polygon polygon, @Nullable BoundingBox bbox); static MultiPolygon fromLngLats(@NonNull List<List<List<Point>>> points); static MultiPolygon fromLngLats(@NonNull List<List<List<Point>>> points,
                                         @Nullable BoundingBox bbox); List<Polygon> polygons(); @NonNull @Override String type(); @Nullable @Override BoundingBox bbox(); @NonNull @Override List<List<List<Point>>> coordinates(); @Override String toJson(); static TypeAdapter<MultiPolygon> typeAdapter(Gson gson); @Override String toString(); @Override boolean equals(Object obj); @Override int hashCode(); }
MultiPolygon implements CoordinateContainer<List<List<List<Point>>>> { public static MultiPolygon fromJson(String json) { GsonBuilder gson = new GsonBuilder(); gson.registerTypeAdapterFactory(GeoJsonAdapterFactory.create()); return gson.create().fromJson(json, MultiPolygon.class); } MultiPolygon(String type, @Nullable BoundingBox bbox, List<List<List<Point>>> coordinates); static MultiPolygon fromJson(String json); static MultiPolygon fromPolygons(@NonNull List<Polygon> polygons); static MultiPolygon fromPolygons(@NonNull List<Polygon> polygons,
                                          @Nullable BoundingBox bbox); static MultiPolygon fromPolygon(@NonNull Polygon polygon); static MultiPolygon fromPolygon(@NonNull Polygon polygon, @Nullable BoundingBox bbox); static MultiPolygon fromLngLats(@NonNull List<List<List<Point>>> points); static MultiPolygon fromLngLats(@NonNull List<List<List<Point>>> points,
                                         @Nullable BoundingBox bbox); List<Polygon> polygons(); @NonNull @Override String type(); @Nullable @Override BoundingBox bbox(); @NonNull @Override List<List<List<Point>>> coordinates(); @Override String toJson(); static TypeAdapter<MultiPolygon> typeAdapter(Gson gson); @Override String toString(); @Override boolean equals(Object obj); @Override int hashCode();  }