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>
-
- net.sf.eBusx.geo.GeoPoint.Builder
-
- Enclosing class:
- GeoPoint
public static final class GeoPoint.Builder extends GeoObject.GeoBuilder<GeoPoint>
Builder class used to createGeoPoint
instances. SinceBuilder
constructor is private the only was to obtain aBuilder
instance 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 GeoPoint
buildImpl()
Returns a newGeoPoint
instance created from this builder's settings.GeoPoint.Builder
position(Position position)
Sets GeoJSON position.protected Validator
validate(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
-
validate
protected Validator validate(Validator problems)
Checks if position has been set.- Overrides:
validate
in classEField.Builder<GeoPoint>
- Parameters:
problems
- add each detected problem to this validator.- Returns:
problems
.- See Also:
Validator
-
buildImpl
protected GeoPoint buildImpl()
Returns a newGeoPoint
instance created from this builder's settings.- Specified by:
buildImpl
in classEMessageObject.Builder<GeoPoint>
- Returns:
- OpenStreetMap node instance.
-
position
public GeoPoint.Builder position(Position position)
Sets GeoJSON position. Returnsthis Builder
instance so that builder method calls can be chained.- Parameters:
position
- single position.- Returns:
this Builder
instance.- Throws:
java.lang.NullPointerException
- ifposition
isnull
.
-
-