Class PlacesPOI
java.lang.Object
com.adobe.marketing.mobile.places.PlacesPOI
This class represents a Point of Interest (POI) in the Places extension.
-
Method Summary
Modifier and TypeMethodDescriptionbooleancomparePriority(PlacesPOI otherPOI) Compares two POIs to determine which one has higher priority.booleanReturns whether the user is within the POI.booleanReturns the identifier of the POI.doubleReturns the latitude of the POI.Returns the library of the POI.doubleReturns the longitude of the POI.Returns the metadata of the POI.getName()Returns the name of the POI.intReturns the radius of the POI.intReturns the weight of the POI.inthashCode()voidsetUserIsWithin(boolean userIsWithin) Sets whether the user is within the POI.
-
Method Details
-
getIdentifier
Returns the identifier of the POI.- Returns:
- the identifier of the POI
-
getName
Returns the name of the POI.- Returns:
- the name of the POI
-
containsUser
public boolean containsUser()Returns whether the user is within the POI.- Returns:
- true if the user is within the POI, false otherwise
-
setUserIsWithin
public void setUserIsWithin(boolean userIsWithin) Sets whether the user is within the POI.- Parameters:
userIsWithin- true if the user is within the POI, false otherwise
-
getLatitude
public double getLatitude()Returns the latitude of the POI.- Returns:
- the latitude of the POI
-
getLongitude
public double getLongitude()Returns the longitude of the POI.- Returns:
- the longitude of the POI
-
getRadius
public int getRadius()Returns the radius of the POI.- Returns:
- the radius of the POI
-
getMetadata
Returns the metadata of the POI.- Returns:
- the metadata of the POI
-
getWeight
public int getWeight()Returns the weight of the POI.- Returns:
- the weight of the POI
-
getLibrary
Returns the library of the POI.- Returns:
- the library of the POI
-
equals
-
comparePriority
Compares two POIs to determine which one has higher priority.Calculation of priority based on: 1. Weight (lower number has higher priority) 2. Radius (smaller radius has higher priority) 3. Order (current object will have higher priority if weight and radius are same)
- Parameters:
otherPOI- the PlacesDataObject to compare priority against this object's priority- Returns:
- true if the calling object has higher priority than the parameter passed in
-
hashCode
public int hashCode()
-