Returns a list of polygons which make up this MultiPolygon instance.

@return a list of {@link Polygon}s which make up this MultiPolygon instance
@since 3.0.0
554043
public List<Polygon> polygons() {
    List<List<List<Point>>> coordinates = coordinates();
    List<Polygon> polygons = new ArrayList<>(coordinates.size());
    for (List<List<Point>> points : coordinates) {
      polygons.add(Polygon.fromLngLats(points));
    }
    return polygons;
  }
439052
public java.util.List<String> getObjectIds() {
        if (objectIds == null) {
            objectIds = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return objectIds;
    }
426409
public MultiPolygonOptions toPolygons(MultiPolygon multiPolygon) {

        MultiPolygonOptions polygons = new MultiPolygonOptions();

        for (Polygon polygon : multiPolygon.getPolygons()) {
            PolygonOptions polygonOptions = toPolygon(polygon);
            polygons.add(polygonOptions);
        }

        return polygons;
    }
902117
public List<Double> getSplits() {
        List<Double> splits = new ArrayList<Double>();
        for (Node curNode : getVisibleChildren()) {
            splits.add(nodeSplits.get(curNode));
        }
        return splits;
    }
42465
public List<T> getList() {
    final ArrayList<T> list = new ArrayList<T>();
    for (final Entry<T, AtomicInteger> e : this.map.entrySet()) {
      for (int i = 0; i < e.getValue().get(); i++) {
        list.add(e.getKey());
      }
    }
    return list;
  }
323748
public PolygonOptions toPolygon(Polygon polygon) {

        PolygonOptions polygonOptions = new PolygonOptions();

        List<LineString> rings = polygon.getRings();

        if (!rings.isEmpty()) {

            Double z = null;

            // Add the polygon points
            LineString polygonLineString = rings.get(0);

            // Try to simplify the number of points in the polygon ring
            List<Point> points = simplifyPoints(polygonLineString.getPoints());

            for (Point point : points) {
                LatLng latLng = toLatLng(point);
                polygonOptions.add(latLng);
                if (point.hasZ()) {
                    z = (z == null) ? point.getZ() : Math.max(z, point.getZ());
                }
            }

            // Add the holes
            for (int i = 1; i < rings.size(); i++) {
                LineString hole = rings.get(i);

                // Try to simplify the number of points in the polygon hole
                List<Point> holePoints = simplifyPoints(hole.getPoints());

                List<LatLng> holeLatLngs = new ArrayList<LatLng>();
                for (Point point : holePoints) {
                    LatLng latLng = toLatLng(point);
                    holeLatLngs.add(latLng);
                    if (point.hasZ()) {
                        z = (z == null) ? point.getZ() : Math.max(z,
                                point.getZ());
                    }
                }
                polygonOptions.addHole(holeLatLngs);
            }

            if (polygon.hasZ() && z != null) {
                polygonOptions.zIndex(z.floatValue());
            }
        }

        return polygonOptions;
    }
1080639
function() {
        var geometry = this.polygon && this.polygon.geometry;
        if(geometry && this.multi) {
            geometry = new OpenLayers.Geometry.MultiPolygon([geometry]);
        }
        return geometry;
    }
1335609
public static Polygon createDummyPolygon() {
        Coordinate[] c = new Coordinate[]{new Coordinate(0.0, 0.0), new Coordinate(1.0, 1.0), new Coordinate(1.0, 0.0),
                new Coordinate(0.0, 0.0)};
        LinearRing linearRing = gf().createLinearRing(c);
        return gf().createPolygon(linearRing, null);
    }
136252
public Polygon getHull() {
    if(hull == null) {
      run(true);
    }
    DoubleMinMax minmaxX = new DoubleMinMax();
    DoubleMinMax minmaxY = new DoubleMinMax();
    List<double[]> hullp = new ArrayList<>(hull.size());
    for(IntIntPair pair : hull) {
      double[] v = points.get(pair.first);
      hullp.add(v);
      minmaxX.put(v[0]);
      minmaxY.put(v[1]);
    }
    return new Polygon(hullp, minmaxX.getMin(), minmaxX.getMax(), minmaxY.getMin(), minmaxY.getMax());
  }
973754
public Set<T> types() {
        // NOTE: purely unoptimized!
        Set<T> types = new HashSet<T>();
        for (Object o : edges.values()) {
            Set<T> s = (Set<T>)o;
            types.addAll(s);
        }
        return types;
    }
1011531
public java.util.List<ClusterNode> getClusterNodes() {
        if (clusterNodes == null) {
            clusterNodes = new com.amazonaws.internal.SdkInternalList<ClusterNode>();
        }
        return clusterNodes;
    }
1183129
public java.util.List<String> getInstanceTypes() {
        if (instanceTypes == null) {
            instanceTypes = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return instanceTypes;
    }
1030981
public List<Point> getMazePoints() {
        List<Point> points = new ArrayList<Point>();
        for (int row = 0; row < this.rows; row++) {
            for (int column = 0; column < this.columns; column++) {
                points.add(new Point(column, row));
            }
        }
        return points;
    }
1204815
public static MultiPolygon removeCoordinates(MultiPolygon g) {
        ArrayList<Polygon> polys = new ArrayList<Polygon>();
        for (int i = 0; i < g.getNumGeometries(); i++) {
            Polygon poly = (Polygon) g.getGeometryN(i);
            polys.add(removeCoordinates(poly));
        }
        return FACTORY.createMultiPolygon(GeometryFactory.toPolygonArray(polys));
    }
481012
public static List<Polygon> createSimpleDirectionArrow( Geometry... geometries ) {
        List<Polygon> polygons = new ArrayList<>();
        for( Geometry geometry : geometries ) {
            for( int i = 0; i < geometry.getNumGeometries(); i++ ) {
                Geometry geometryN = geometry.getGeometryN(i);
                if (geometryN instanceof LineString) {
                    LineString line = (LineString) geometryN;
                    polygons.addAll(makeArrows(line));
                } else if (geometryN instanceof Polygon) {
                    Polygon polygonGeom = (Polygon) geometryN;
                    LineString exteriorRing = polygonGeom.getExteriorRing();
                    polygons.addAll(makeArrows(exteriorRing));
                    int numInteriorRing = polygonGeom.getNumInteriorRing();
                    for( int j = 0; j < numInteriorRing; j++ ) {
                        LineString interiorRingN = polygonGeom.getInteriorRingN(j);
                        polygons.addAll(makeArrows(interiorRingN));
                    }
                }
            }
        }
        return polygons;
    }
462211
public Polygon copy() {
		float[] copyPoints = new float[points.length];
		System.arraycopy(points, 0, copyPoints, 0, copyPoints.length);
		
		return new Polygon(copyPoints);
	}
1238619
public List<GridNode> getSurroundingNodes() {
        List<GridNode> nodes = new ArrayList<GridNode>();
        Direction[] orderedDirs = Direction.getOrderedDirs();
        for( int i = 0; i < orderedDirs.length; i++ ) {
            Direction direction = orderedDirs[i];
            int newCol = col + direction.col;
            int newRow = row + direction.row;
            if (isInRaster(newCol, newRow)) {
                GridNode node = new GridNode(gridIter, cols, rows, xRes, yRes, newCol, newRow);
                if (node.isValid()) {
                    nodes.add(node);
                } else {
                    nodes.add(null);
                }
            } else {
                nodes.add(null);
            }
        }
        return nodes;
    }