edu.indiana.dde.mylead.common
Class MyLeadPt

java.lang.Object
  extended byedu.indiana.dde.mylead.common.MyLeadPt

public class MyLeadPt
extends java.lang.Object

This class is used for spatial attributes in the myLeadAttrData class to store a single x,y coordinate point. Polygon elements contain at least three instances of the point class. This class is also used in the MyLeadElement class to store point data used in queries.


Constructor Summary
MyLeadPt()
          This default constructor for a MyLeadPt sets the x and y coordinates to null.
MyLeadPt(double x, double y)
          This constructor takes doubles for the x and y coordinates of the point.
 
Method Summary
 double getXValue()
           
 double getYValue()
           
 boolean isInitialized()
          Checks if the x and y coordinate values have been set - needed for the default constructor.
 void setXValue(double xVal)
           
 void setYValue(double yVal)
           
 java.lang.String wrapPoint()
          The purpose of this method is to create a coordinate pair that will then be included in a Point or Polygon definition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MyLeadPt

public MyLeadPt()
This default constructor for a MyLeadPt sets the x and y coordinates to null. If the coordinates are not both subsequently set using the setXValue and setYValue methods respectively, then the wrapPoint method will return a blank string and the point will be omitted from the query.


MyLeadPt

public MyLeadPt(double x,
                double y)
This constructor takes doubles for the x and y coordinates of the point.

Parameters:
x - double for the x-coordinate of the point.
y - double for the y-coordinate of the point.
Method Detail

setXValue

public void setXValue(double xVal)

getXValue

public double getXValue()

setYValue

public void setYValue(double yVal)

getYValue

public double getYValue()

isInitialized

public boolean isInitialized()
Checks if the x and y coordinate values have been set - needed for the default constructor.

Returns:
boolean which indicates whether the x and y coordinates have been set.

wrapPoint

public java.lang.String wrapPoint()
The purpose of this method is to create a coordinate pair that will then be included in a Point or Polygon definition. Example - A polygon with three vertices may have the following definition: Polygon(1 1, 2 2, 3 1) When wrap point is called for the first point, it would return the string "1 1".

Returns:
String containing the point data.