public static class IAGeofence.Builder
extends java.lang.Object
IAGeofence
.Constructor and Description |
---|
Builder() |
Builder(IAGeofence geofence)
Builder pre-populated from given
IAGeofence |
Modifier and Type | Method and Description |
---|---|
IAGeofence |
build()
Create a
IAGeofence from this
IAGeofence.Builder . |
IAGeofence.Builder |
withEdges(java.util.List<double[]> edges)
Configures the IAGeofence with the list of unique WGS84 (latitude, longitude) points.
|
IAGeofence.Builder |
withExpirationDuration(long expirationDuration)
Configure the IAGeofence with the given
expiration time in milliseconds. |
IAGeofence.Builder |
withFloor(int floor)
Configure the IAGeofence with the given
floor number . |
IAGeofence.Builder |
withId(java.lang.String id)
Configure the IAGeofence with the given
identification code . |
IAGeofence.Builder |
withLoiteringDelay(long loiteringDelay)
Configure the IAGeofence with the given
loitering delay in milliseconds. |
IAGeofence.Builder |
withPayload(org.json.JSONObject payload)
Configure the IAGeofence with the given
payload . |
IAGeofence.Builder |
withTransitionType(int bitmask)
Configure the IAGeofence with the given
transition types . |
public Builder(IAGeofence geofence)
IAGeofence
public Builder()
public IAGeofence.Builder withEdges(java.util.List<double[]> edges)
IAGeofence.getEdges()
public IAGeofence.Builder withId(java.lang.String id)
identification code
.IAGeofence.getId()
public IAGeofence.Builder withPayload(org.json.JSONObject payload) throws java.lang.IllegalArgumentException
payload
. If this method is not called,
the IAGeofence is constructed with empty JSONObject as the payload.java.lang.IllegalArgumentException
IAGeofence.hasPayload()
,
IAGeofence.getPayload()
public IAGeofence.Builder withFloor(int floor)
floor number
.IAGeofence.hasFloor()
,
IAGeofence.getFloor()
public IAGeofence.Builder withLoiteringDelay(long loiteringDelay)
loitering delay
in milliseconds.public IAGeofence.Builder withExpirationDuration(long expirationDuration)
expiration time
in milliseconds.public IAGeofence.Builder withTransitionType(int bitmask)
transition types
. The transition types
are set as bitmask, for example:
int transitionTypes = IAGeofence.GEOFENCE_TRANSITION_ENTER |
IAGeofence.GEOFENCE_TRANSITION_EXITpublic IAGeofence build()
IAGeofence
from this
IAGeofence.Builder
.java.lang.IllegalArgumentException
- If edges, id or transition types are not set.