Class GeoMultiPolygon.Builder

    • Method Detail

      • add

        public GeoMultiPolygon.Builder add​(GeoPolygon polygon)
        Appends polygon to polygons list.
        Parameters:
        polygon - append this polygon.
        Returns:
        this Builder instance.
        Throws:
        java.lang.NullPointerException - if polygon is null.
      • addAll

        public GeoMultiPolygon.Builder addAll​(@Nullable
                                              GeoPolygon[] polygons)
        Appends polygon array to polygons list. Polygons array may be null or empty. If this case nothing is done.
        Parameters:
        polygons - append all polygons to list.
        Returns:
        this Builder instance.
      • addAll

        public GeoMultiPolygon.Builder addAll​(@Nullable
                                              java.util.Collection<GeoPolygon> polygons)
        Appends polygons collection to polygons list. Polygons collection may be null or empty.
        Parameters:
        polygons - append all polygons to list.
        Returns:
        this Builder instance.
      • polygons

        public GeoMultiPolygon.Builder polygons​(GeoPolygon[] polygons)
        Sets polygons list to given array. Note that all previously added polygons are removed from the list prior to adding these polygons but after determining that the array is not null.
        Parameters:
        polygons - GeoJSON polygons.
        Returns:
        this Builder instance.
        Throws:
        java.lang.NullPointerException - if polygons is null. If this exception is thrown then polygons list is unchanged.