Package com.geouniq.android
Class GeoUniq.GeoFence.Builder
- java.lang.Object
-
- com.geouniq.android.GeoUniq.GeoFence.Builder
-
- Enclosing class:
- GeoUniq.GeoFence
public static class GeoUniq.GeoFence.Builder extends java.lang.ObjectBuilder class to obtainGeoUniq.GeoFenceobjects
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GeoUniq.GeoFencecreate()Creates aGeoUniq.GeoFencewith the parameters supplied to thisBuilder.
Calling this method does not set theGeoFenceto be monitored.GeoUniq.GeoFence.BuildersetArea(GeoUniq.CircularArea area)Sets the area to be monitoredGeoUniq.GeoFence.BuildersetCallbackClass(java.lang.Class<? extends GeoUniq.GeoFenceListener> callbackClass)Sets the callback class that will receive updates when the status of theGeoFencechangesGeoUniq.GeoFence.BuildersetExpirationDate(java.util.Date expirationDate)Sets the expiration date for theGeoFence.
TheGeoFencewill no longer be monitored and will be automatically deleted after this date.
If not set, theGeoFencenever expires.
-
-
-
Method Detail
-
setArea
public GeoUniq.GeoFence.Builder setArea(GeoUniq.CircularArea area)
Sets the area to be monitored- Parameters:
area- TheGeoUniq.CircularAreato be monitored- Returns:
- This
Builderobject to allow for chaining of calls to set methods
-
setCallbackClass
public GeoUniq.GeoFence.Builder setCallbackClass(java.lang.Class<? extends GeoUniq.GeoFenceListener> callbackClass)
Sets the callback class that will receive updates when the status of theGeoFencechanges- Parameters:
callbackClass- A class implementingGeoUniq.GeoFenceListenerinterface- Returns:
- This
Builderobject to allow for chaining of calls to set methods - See Also:
GeoUniq.GeoFenceListener,GeoUniq.setGeoFence(GeoFence)
-
setExpirationDate
public GeoUniq.GeoFence.Builder setExpirationDate(java.util.Date expirationDate)
Sets the expiration date for theGeoFence.
TheGeoFencewill no longer be monitored and will be automatically deleted after this date.
If not set, theGeoFencenever expires.- Parameters:
expirationDate- ADatecorresponding to the desired expiration date- Returns:
- This
Builderobject to allow for chaining of calls to set methods
-
create
public GeoUniq.GeoFence create()
Creates aGeoUniq.GeoFencewith the parameters supplied to thisBuilder.
Calling this method does not set theGeoFenceto be monitored.GeoUniq.setGeoFence(GeoFence)must be called to start monitoring the returnedGeoFence.- Returns:
- A new geofence
-
-