Package net.sf.eBusx.geo
Class GeoObject.GeoBuilder<F extends GeoObject,B extends GeoObject.GeoBuilder<F,?>>
- java.lang.Object
-
- net.sf.eBus.messages.EMessageObject.Builder<M>
-
- net.sf.eBus.messages.EField.Builder<F>
-
- net.sf.eBusx.geo.GeoObject.GeoBuilder<F,B>
-
- Type Parameters:
F- target GeoJSON object type.B- Subclass builder type.
- Direct Known Subclasses:
GeoCircle.Builder,GeoCollection.Builder,GeoEllipse.Builder,GeoLineString.Builder,GeoMultiLineString.Builder,GeoMultiPoint.Builder,GeoMultiPolygon.Builder,GeoPoint.Builder,GeoPolygon.Builder
- Enclosing class:
- GeoObject
public abstract static class GeoObject.GeoBuilder<F extends GeoObject,B extends GeoObject.GeoBuilder<F,?>> extends EField.Builder<F>
Base class for all GeoJSON object builders. Used to set the GeoJSON object type.
-
-
Field Summary
-
Fields inherited from class net.sf.eBus.messages.EMessageObject.Builder
mTargetClass
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedGeoBuilder(java.lang.Class<F> clazz, GeoObject.GeoType type)Constructor used to set the GeoJSON class and type.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description BboundingBox(BoundingBox bbox)Sets optional bounding box.protected abstract Bself()Returns subclass instance.Btype(GeoObject.GeoType type)Does nothing since GeoJSON type is set in the constructor.-
Methods inherited from class net.sf.eBus.messages.EField.Builder
validate
-
Methods inherited from class net.sf.eBus.messages.EMessageObject.Builder
build, buildImpl
-
-
-
-
Constructor Detail
-
GeoBuilder
protected GeoBuilder(java.lang.Class<F> clazz, GeoObject.GeoType type)
Constructor used to set the GeoJSON class and type.- Parameters:
clazz- target GeoJSON object class.type- target GeoJSON object type.
-
-
Method Detail
-
self
protected abstract B self()
Returns subclass instance.- Returns:
- builder instance reference.
-
type
public final B type(GeoObject.GeoType type)
Does nothing since GeoJSON type is set in the constructor. This method is required for eBus message de-serialization.- Parameters:
type- GeoJSON data type.- Returns:
this Builderinstance.
-
boundingBox
public final B boundingBox(BoundingBox bbox)
Sets optional bounding box.- Parameters:
bbox- bounding box. May benull.- Returns:
this Builderinstance.
-
-