Package net.sf.eBusx.geo
Class GeoPoint.Builder
- java.lang.Object
-
- net.sf.eBus.messages.EMessageObject.Builder<M>
-
- net.sf.eBus.messages.EField.Builder<F>
-
- net.sf.eBusx.geo.GeoObject.GeoBuilder<GeoPoint,GeoPoint.Builder>
-
- net.sf.eBusx.geo.GeoPoint.Builder
-
- Enclosing class:
- GeoPoint
public static final class GeoPoint.Builder extends GeoObject.GeoBuilder<GeoPoint,GeoPoint.Builder>
Builder class used to createGeoPointinstances. SinceBuilderconstructor is private the only was to obtain aBuilderinstance is by callingGeoPoint.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 protected GeoPointbuildImpl()Returns a newGeoPointinstance created from this builder's settings.GeoPoint.Builderposition(Position position)Sets GeoJSON position.protected GeoPoint.Builderself()Returns subclass instance.protected Validatorvalidate(Validator problems)Checks if position has been set.-
Methods inherited from class net.sf.eBusx.geo.GeoObject.GeoBuilder
boundingBox, type
-
Methods inherited from class net.sf.eBus.messages.EMessageObject.Builder
build
-
-
-
-
Method Detail
-
self
protected GeoPoint.Builder self()
Description copied from class:GeoObject.GeoBuilderReturns subclass instance.- Specified by:
selfin classGeoObject.GeoBuilder<GeoPoint,GeoPoint.Builder>- Returns:
- builder instance reference.
-
validate
protected Validator validate(Validator problems)
Checks if position has been set.- Overrides:
validatein classEField.Builder<GeoPoint>- Parameters:
problems- add each detected problem to this validator.- Returns:
problems.- See Also:
Validator
-
buildImpl
protected GeoPoint buildImpl()
Returns a newGeoPointinstance created from this builder's settings.- Specified by:
buildImplin classEMessageObject.Builder<GeoPoint>- Returns:
- OpenStreetMap node instance.
-
position
public GeoPoint.Builder position(Position position)
Sets GeoJSON position. Returnsthis Builderinstance so that builder method calls can be chained.- Parameters:
position- single position.- Returns:
this Builderinstance.- Throws:
java.lang.NullPointerException- ifpositionisnull.
-
-