Package com.indooratlas.android.sdk
Class IAPOI.Builder
- java.lang.Object
-
- com.indooratlas.android.sdk.IAPOI.Builder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IAPOI
build()
Create aIAPOI
from thisIAPOI.Builder
.IAPOI.Builder
withFloor(int floor)
Configure the POI with the givenfloor number
.IAPOI.Builder
withId(String id)
Configure the POI with the givenidentification code
.IAPOI.Builder
withLocation(IALatLng location)
Configures the POI with the given WGS84 (latitude, longitude) coordinate.IAPOI.Builder
withName(String name)
Configure the POI with the given name.IAPOI.Builder
withPayload(JSONObject payload)
Configure the POI with the givenpayload
.
-
-
-
Method Detail
-
withLocation
public IAPOI.Builder withLocation(IALatLng location)
Configures the POI with the given WGS84 (latitude, longitude) coordinate. This is required.- See Also:
IAPOI.getLocation()
-
withId
public IAPOI.Builder withId(String id)
Configure the POI with the givenidentification code
. This is required.- See Also:
IAPOI.getId()
-
withName
public IAPOI.Builder withName(String name)
Configure the POI with the given name. This is optional, empty string is default.- See Also:
IAPOI.getName()
-
withPayload
public IAPOI.Builder withPayload(JSONObject payload) throws IllegalArgumentException
Configure the POI with the givenpayload
. If this method is not called, the IAPOI is constructed with empty JSONObject as the payload.- Throws:
IllegalArgumentException
- See Also:
IAPOI.hasPayload()
,IAPOI.getPayload()
-
withFloor
public IAPOI.Builder withFloor(int floor)
Configure the POI with the givenfloor number
. This is optional, default is floor 0.- See Also:
IAPOI.getFloor()
-
build
public IAPOI build()
Create aIAPOI
from thisIAPOI.Builder
.- Throws:
IllegalArgumentException
- If a required parameter is not set
-
-