Package com.esri.arcgisruntime.geometry
Class PointBuilder
 java.lang.Object

 com.esri.arcgisruntime.geometry.GeometryBuilder

 com.esri.arcgisruntime.geometry.PointBuilder

public final class PointBuilder extends GeometryBuilder
Helper class for building immutablePoint
geometries. Points are the most straightforward geometries to define, and therefore Point class constructors provide the same options as available on this builder. This builder class is provided mainly for consistency with other immutable geometries.Use the constructors to define x,y coordinates, z and m values, and a SpatialReference. Once set, the SpatialReference cannot be changed. Each other value can also be set individually or later modified by using the setter methods. Call the
toGeometry()
method to create a new immutable Point from the current values of this builder. Since:
 100.0.0
 See Also:
Point


Constructor Summary
Constructors Constructor Description PointBuilder(double x, double y)
Creates a new empty PointBuilder with the given x,y coordinates.PointBuilder(double x, double y, double z)
Creates a new point builder with the given x,y coordinates and zvalue.PointBuilder(double x, double y, double z, double m)
Creates a new point builder with the given x,y coordinates and z and mvalues.PointBuilder(double x, double y, double z, double m, SpatialReference spatialReference)
Creates a new point builder with the given x,y coordinates, z and mvalues, and SpatialReference.PointBuilder(double x, double y, double z, SpatialReference spatialReference)
Creates a new point builder with the given x,y coordinates, zvalue, and SpatialReference.PointBuilder(double x, double y, SpatialReference spatialReference)
Creates a new point builder with the given x,y coordinates and SpatialReference.PointBuilder(Point point)
Creates a new empty PointBuilder from the given Point.PointBuilder(SpatialReference spatialReference)
Creates a new empty PointBuilder with the given SpatialReference.

Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getM()
Gets the current mvalue of the point being constructed.double
getX()
Gets the current xcoordinate of the point being constructed.double
getY()
Gets the current ycoordinate of the point being constructed.double
getZ()
Gets the current zvalue of the point being constructed.void
setM(double m)
Sets a new mvalue for the point being constructed.void
setX(double x)
Sets a new xcoordinate for the point being constructed.void
setXY(double x, double y)
Sets new x,y coordinates for the point being constructed.void
setY(double y)
Sets a new ycoordinate for the point being constructed.void
setZ(double z)
Sets a new zvalue for the point being constructed.Point
toGeometry()
Returns a newPoint
based on the current state of this builder.
Methods inherited from class com.esri.arcgisruntime.geometry.GeometryBuilder
create, create, getBuilderType, getExtent, getSpatialReference, hasM, hasZ, isEmpty, isSketchValid, replaceGeometry




Constructor Detail

PointBuilder
public PointBuilder(SpatialReference spatialReference)
Creates a new empty PointBuilder with the given SpatialReference. Parameters:
spatialReference
 the SpatialReference of the new builder Since:
 100.0.0

PointBuilder
public PointBuilder(Point point)
Creates a new empty PointBuilder from the given Point. The SpatialReference of the new builder will match that of the given Point. Parameters:
point
 the point to initialize the new builder from Since:
 100.0.0

PointBuilder
public PointBuilder(double x, double y)
Creates a new empty PointBuilder with the given x,y coordinates. The SpatialReference of the new builder will be null. Parameters:
x
 the xcoordinate of the point being constructedy
 the ycoordinate of the point being constructed Since:
 100.0.0

PointBuilder
public PointBuilder(double x, double y, SpatialReference spatialReference)
Creates a new point builder with the given x,y coordinates and SpatialReference. Parameters:
x
 the xcoordinate of the point being constructedy
 the ycoordinate of the point being constructedspatialReference
 the SpatialReference of the point being constructed Since:
 100.0.0

PointBuilder
public PointBuilder(double x, double y, double z)
Creates a new point builder with the given x,y coordinates and zvalue. The SpatialReference of the new builder will be null. Parameters:
x
 the xcoordinate of the point being constructedy
 the ycoordinate of the point being constructedz
 the zvalue of the point being constructed Since:
 100.0.0

PointBuilder
public PointBuilder(double x, double y, double z, SpatialReference spatialReference)
Creates a new point builder with the given x,y coordinates, zvalue, and SpatialReference. Parameters:
x
 the xcoordinate of the point being constructedy
 the ycoordinate of the point being constructedz
 the zvalue of the point being constructedspatialReference
 the SpatialReference of the point being constructed Since:
 100.0.0

PointBuilder
public PointBuilder(double x, double y, double z, double m)
Creates a new point builder with the given x,y coordinates and z and mvalues. The SpatialReference of the new builder will be null. Parameters:
x
 the xcoordinate of the point being constructedy
 the ycoordinate of the point being constructedz
 the zvalue of the point being constructedm
 the mvalue of the point being constructed Since:
 100.0.0

PointBuilder
public PointBuilder(double x, double y, double z, double m, SpatialReference spatialReference)
Creates a new point builder with the given x,y coordinates, z and mvalues, and SpatialReference. Parameters:
x
 the xcoordinate of the point being constructedy
 the ycoordinate of the point being constructedz
 the zvalue of the point being constructedm
 the mvalue of the point being constructedspatialReference
 the SpatialReference of the point being constructed Since:
 100.0.0


Method Detail

getM
public double getM()
Gets the current mvalue of the point being constructed. Returns:
 the current mvalue
 Since:
 100.0.0

setM
public void setM(double m)
Sets a new mvalue for the point being constructed. Parameters:
m
 the new mvalue Since:
 100.0.0

getX
public double getX()
Gets the current xcoordinate of the point being constructed. Returns:
 the current xcoordinate
 Since:
 100.0.0

setX
public void setX(double x)
Sets a new xcoordinate for the point being constructed. Parameters:
x
 the new xcoordinate Since:
 100.0.0

getY
public double getY()
Gets the current ycoordinate of the point being constructed. Returns:
 the current ycoordinate
 Since:
 100.0.0

setY
public void setY(double y)
Sets a new ycoordinate for the point being constructed. Parameters:
y
 the new ycoordinate Since:
 100.0.0

getZ
public double getZ()
Gets the current zvalue of the point being constructed. Returns:
 the current zvalue
 Since:
 100.0.0

setZ
public void setZ(double z)
Sets a new zvalue for the point being constructed. Parameters:
z
 the new zvalue Since:
 100.0.0

setXY
public void setXY(double x, double y)
Sets new x,y coordinates for the point being constructed. Parameters:
x
 the xcoordinate of the point being constructedy
 the ycoordinate of the point being constructed Since:
 100.0.0

toGeometry
public Point toGeometry()
Returns a newPoint
based on the current state of this builder. This method can be called as many times as required for any specific instance; it does not affect the state of the builder, and returns a new Point each time. Specified by:
toGeometry
in classGeometryBuilder
 Returns:
 a new Point based on the current state of this builder
 Since:
 100.0.0

