Package net.sf.eBusx.geo
Class GeoMultiPolygon.Builder
- java.lang.Object
-
- net.sf.eBus.messages.EMessageObject.Builder<M>
-
- net.sf.eBus.messages.EField.Builder<F>
-
- net.sf.eBusx.geo.GeoObject.GeoBuilder<GeoMultiPolygon,GeoMultiPolygon.Builder>
-
- net.sf.eBusx.geo.GeoMultiPolygon.Builder
-
- Enclosing class:
- GeoMultiPolygon
public static final class GeoMultiPolygon.Builder extends GeoObject.GeoBuilder<GeoMultiPolygon,GeoMultiPolygon.Builder>
Builder class used to create GeoJSON multi-polygon instances. ABuilder
instance is obtained by callingGeoMultiPolygon.builder()
method- See Also:
GeoMultiPolygon.builder()
-
-
Field Summary
-
Fields inherited from class net.sf.eBus.messages.EMessageObject.Builder
mTargetClass
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GeoMultiPolygon.Builder
add(GeoPolygon polygon)
Appends polygon to polygons list.GeoMultiPolygon.Builder
addAll(java.util.Collection<GeoPolygon> polygons)
Appends polygons collection to polygons list.GeoMultiPolygon.Builder
addAll(GeoPolygon[] polygons)
Appends polygon array to polygons list.protected GeoMultiPolygon
buildImpl()
Returns a newGeoMultiPolygon
instance created from this builder's settings.GeoMultiPolygon.Builder
polygons(GeoPolygon[] polygons)
Sets polygons list to given array.protected GeoMultiPolygon.Builder
self()
Returns subclass instance.-
Methods inherited from class net.sf.eBusx.geo.GeoObject.GeoBuilder
boundingBox, type
-
Methods inherited from class net.sf.eBus.messages.EField.Builder
validate
-
Methods inherited from class net.sf.eBus.messages.EMessageObject.Builder
build
-
-
-
-
Method Detail
-
self
protected GeoMultiPolygon.Builder self()
Description copied from class:GeoObject.GeoBuilder
Returns subclass instance.- Specified by:
self
in classGeoObject.GeoBuilder<GeoMultiPolygon,GeoMultiPolygon.Builder>
- Returns:
- builder instance reference.
-
buildImpl
protected GeoMultiPolygon buildImpl()
Returns a newGeoMultiPolygon
instance created from this builder's settings.- Specified by:
buildImpl
in classEMessageObject.Builder<GeoMultiPolygon>
- Returns:
GeoMultiPolygon
instance.
-
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
- ifpolygon
isnull
.
-
addAll
public GeoMultiPolygon.Builder addAll(@Nullable GeoPolygon[] polygons)
Appends polygon array to polygons list. Polygons array may benull
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 benull
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 notnull
.- Parameters:
polygons
- GeoJSON polygons.- Returns:
this Builder
instance.- Throws:
java.lang.NullPointerException
- ifpolygons
isnull
. If this exception is thrown then polygons list is unchanged.
-
-