public class

ProximityRegion

extends Object
java.lang.Object
   ↳ com.neomades.location.ProximityRegion

Class Overview

This class is used to define the proximity region.

The region will be defined with a central location and a radius.

Summary

Public Constructors
ProximityRegion(Location center, float radius)
Creates a new proximity region with the given center point, and radius in meters.
Public Methods
boolean containsLocation(Location location)
Checks whether the ProximityRegion object contains the central location point passed in parameters.
Location getCenter()
Returns the central point of the region alert.
int getId()
Returns the id of the current ProximityRegion object.
float getRadius()
Returns the radius of the central point of the alert region, in meters.
void setId(int id)
Sets the id of the current ProximityRegion object
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ProximityRegion (Location center, float radius)

Creates a new proximity region with the given center point, and radius in meters.

Parameters
center the center point
radius the radius in meters
Throws
NullPointerException if the given center is null

Public Methods

public boolean containsLocation (Location location)

Checks whether the ProximityRegion object contains the central location point passed in parameters.

Parameters
location the central location point.
Returns
  • true if the Location point passed in parameters is already defined in the ProximityRegion object, false if not.

public Location getCenter ()

Returns the central point of the region alert.

Returns
  • the central point of the region alert

public int getId ()

Returns the id of the current ProximityRegion object.

Returns
  • the id of the current Proximity Region object.

public float getRadius ()

Returns the radius of the central point of the alert region, in meters.

Returns
  • the radius of the central point of the alert region, in meters.

public void setId (int id)

Sets the id of the current ProximityRegion object

Parameters
id the id of the current Proximity Region object.