Package net.sf.eBusx.geo
Class GeoMultiPoint.Builder
- java.lang.Object
-
- net.sf.eBus.messages.EMessageObject.Builder<M>
-
- net.sf.eBus.messages.EField.Builder<F>
-
- net.sf.eBusx.geo.GeoObject.GeoBuilder<GeoMultiPoint>
-
- net.sf.eBusx.geo.GeoMultiPoint.Builder
-
- Enclosing class:
- GeoMultiPoint
public static final class GeoMultiPoint.Builder extends GeoObject.GeoBuilder<GeoMultiPoint>
Builder class used to createGeoMultiPoint
instances. It is suggested that a new builder instance be created for each new multi-point instance rather than re-using builder instances.
-
-
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 GeoMultiPoint.Builder
add(Position pos)
Appends position to positions list.GeoMultiPoint.Builder
addAll(java.util.Collection<Position> positions)
Appends position collection to positions list.GeoMultiPoint.Builder
addAll(Position[] positions)
Appends position array to positions list.protected GeoMultiPoint
buildImpl()
Returns a newGeoMultiPoint
instance configured fromthis Builder
's validated settings.GeoMultiPoint.Builder
positions(Position[] positions)
Sets positions list to the given position values.-
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
-
buildImpl
protected GeoMultiPoint buildImpl()
Returns a newGeoMultiPoint
instance configured fromthis Builder
's validated settings.- Specified by:
buildImpl
in classEMessageObject.Builder<GeoMultiPoint>
- Returns:
- new multi-point GeoJSON instance.
-
add
public GeoMultiPoint.Builder add(Position pos)
Appends position to positions list.- Parameters:
pos
- append this position.- Returns:
this Builder
instance.- Throws:
java.lang.NullPointerException
- ifpos
isnull
.- See Also:
addAll(Position[])
,addAll(Collection)
,positions(Position[])
-
addAll
public GeoMultiPoint.Builder addAll(Position[] positions)
Appends position array to positions list.- Parameters:
positions
- append all positions to list.- Returns:
this Builder
instance.- Throws:
java.lang.NullPointerException
- ifpositions
isnull
.- See Also:
add(Position)
,addAll(Collection)
,positions(Position[])
-
addAll
public GeoMultiPoint.Builder addAll(java.util.Collection<Position> positions)
Appends position collection to positions list.- Parameters:
positions
- append all positions to list.- Returns:
this Builder
instance.- Throws:
java.lang.NullPointerException
- ifpositions
isnull
.- See Also:
add(Position)
,addAll(Position[])
,positions(Position[])
-
positions
public GeoMultiPoint.Builder positions(Position[] positions)
Sets positions list to the given position values. Note that all previously a-dded positions are removed from the list prior to adding these positions but after verifying that positions is notnull
.- Parameters:
positions
- set position list- Returns:
this Builder
instance.- Throws:
java.lang.NullPointerException
- ifpositions
isnull
. If this exception is thrown then positions list is unchanged.- See Also:
add(Position)
,addAll(Position[])
,addAll(Collection)
-
-