Package com.indooratlas.android.sdk
Class IAPOI
- java.lang.Object
-
- com.indooratlas.android.sdk.IAPOI
-
- All Implemented Interfaces:
Parcelable,IALatLngFloorCompatible
public class IAPOI extends Object implements IALatLngFloorCompatible, Parcelable
A data object representing a Point of Interest (POI)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classIAPOI.BuilderBuilder to configureIAPOI.-
Nested classes/interfaces inherited from interface android.os.Parcelable
Parcelable.ClassLoaderCreator<T extends Object>, Parcelable.Creator<T extends Object>
-
-
Field Summary
Fields Modifier and Type Field Description static Parcelable.Creator<IAPOI>CREATOR-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intdescribeContents()booleanequals(Object o)intgetFloor()Return theintfloor number for this POIStringgetId()Return the identifier for this POIIALatLngFloorgetLatLngFloor()IALatLnggetLocation()Return the WGS84 (latitude, longitude) coordinate of this POIStringgetName()Return name of this POI.JSONObjectgetPayload()Return theJSONObjectpayload for this POI.inthashCode()booleanhasPayload()Check whether this POI has a non-empty payloadStringtoString()voidwriteToParcel(Parcel parcel, int flags)
-
-
-
Field Detail
-
CREATOR
public static final Parcelable.Creator<IAPOI> CREATOR
-
-
Constructor Detail
-
IAPOI
public IAPOI(@NonNull String id, int floor, @NonNull IALatLng location, @Nullable String name, @Nullable JSONObject payload)
Construct a Point of Interest (POI)- Parameters:
id- unique IDfloor- floor numberlocation- coordinatesname- name of POI (optional)payload- JSON payload (optional)
-
IAPOI
protected IAPOI(Parcel in)
Do not use this constructor directly.
-
-
Method Detail
-
writeToParcel
public void writeToParcel(Parcel parcel, int flags)
- Specified by:
writeToParcelin interfaceParcelable
-
getId
public String getId()
Return the identifier for this POI
-
getFloor
public int getFloor()
Return theintfloor number for this POI
-
getLocation
public IALatLng getLocation()
Return the WGS84 (latitude, longitude) coordinate of this POI
-
getName
public String getName()
Return name of this POI. Empty string if not specified
-
getPayload
public JSONObject getPayload()
Return theJSONObjectpayload for this POI. Empty object if not available.
-
hasPayload
public boolean hasPayload()
Check whether this POI has a non-empty payload- See Also:
getPayload()
-
describeContents
public int describeContents()
- Specified by:
describeContentsin interfaceParcelable
-
getLatLngFloor
public IALatLngFloor getLatLngFloor()
- Specified by:
getLatLngFloorin interfaceIALatLngFloorCompatible
-
-