# Google Data APIs Client Library (1.43.0)

## com.google.gdata.data.geo.impl
Class PointDataImpl

    java.lang.Object
      com.google.gdata.data.geo.impl.PointDataImpl

All Implemented Interfaces:
  PointData

    public class PointDataImpl

extends java.lang.Object
implements PointData

Implementation of the PointData interface. Currently only supports a non-repeating Point extension. This class uses an `ExtensionPoint` that is passed in to store the Point extension.

Constructor Summary
`PointDataImpl(ExtensionPoint extensionPoint)` Construct a new implementation of PointData with the given extension point as the backing storage for data.

Method Summary
`void` `clearPoint()` Clears the point data and removes the extension point.
`static void` `clearPoint(ExtensionPoint ext)` Removes the first Point extension found on the extension point.
`void` `declareExtensions(ExtensionProfile extProfile)`
`Point` `getGeoLocation()` Gets the geo-location of the entity.
`static Point` `getPoint(ExtensionPoint ext)` Helper method to retrieve the Box extension point.
`void` `setGeoLocation(java.lang.Double lat, java.lang.Double lon)` Sets the geo-location of the entity based on the lat and long coordinates passed in.
`void` `setGeoLocation(Point point)` Sets the geo-location of the entity based on the Point extension.
`static void` `setPoint(ExtensionPoint ext, Point point)` Sets the geo point of the extension passed in.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PointDataImpl

    public PointDataImpl(ExtensionPoint extensionPoint)

  Construct a new implementation of PointData with the given extension point as the backing storage for data.

Method Detail

### setGeoLocation

    public void setGeoLocation(java.lang.Double lat,
                               java.lang.Double lon)
                        throws java.lang.IllegalArgumentException

  Sets the geo-location of the entity based on the lat and long coordinates passed in.

  Specified by:
    `setGeoLocation` in interface `PointData`
  Parameters:
    `lat` - The latitude coordinate, between -90 and 90 degrees.
    `lon` - The longitude coordinate, between -180 and 180 degrees.
  Throws:
    `java.lang.IllegalArgumentException` - if the latitude and longitude coordinates are invalid.

### setGeoLocation

    public void setGeoLocation(Point point)

  Sets the geo-location of the entity based on the Point extension.

  Specified by:
    `setGeoLocation` in interface `PointData`
  Parameters:
    `point` - A point containing the latitude and longitude coordinates.

### getGeoLocation

    public Point getGeoLocation()

  Gets the geo-location of the entity.

  Specified by:
    `getGeoLocation` in interface `PointData`
  Returns:
    a Point that contains the geo-coordinates (latitude and longitude).

### clearPoint

    public void clearPoint()

  Description copied from interface: `PointData`
  Clears the point data and removes the extension point.

  Specified by:
    `clearPoint` in interface `PointData`

### declareExtensions

    public void declareExtensions(ExtensionProfile extProfile)

### setPoint

    public static void setPoint(ExtensionPoint ext,
                                Point point)

  Sets the geo point of the extension passed in. This will first try to replace any existing point information. If there is no existing point, then it will simply add the point extension.

  Parameters:
    `ext` - The extension point to add the Point to.
    `point` - The new point information.

### getPoint

    public static Point getPoint(ExtensionPoint ext)

  Helper method to retrieve the Box extension point.

  Parameters:
    `ext` - The containing extension point.
  Returns:
    An extension point that implements the Box interface and contain box information.

### clearPoint

    public static void clearPoint(ExtensionPoint ext)

  Removes the first Point extension found on the extension point. If the point extension is a GeoRssWhere, it will only remove the GeoRssWhere extension if it does not contain a Box/Envelope extension.

  Parameters:
    `ext` - The extension point from which to clear the Box extension.