uk.ac.lancs.relate.trigger.conditions
Class ApproachingInZone

java.lang.Object
  extended by uk.ac.lancs.relate.trigger.conditions.Condition
      extended by uk.ac.lancs.relate.trigger.conditions.ZoneCondition
          extended by uk.ac.lancs.relate.trigger.conditions.ApproachingInZone
All Implemented Interfaces:
java.io.Serializable

public class ApproachingInZone
extends ZoneCondition

This condition is true if a trackable is within the zone and moving towards the point of reference.

Author:
Sara Streng
See Also:
Serialized Form

Constructor Summary
ApproachingInZone(java.lang.String id1, Zone zone, java.lang.String deviceId)
          Creates a new condition for a given application, user id and zone.
 
Method Summary
 boolean evaluate()
          Return true if the condition is fulfilled, else false.
 
Methods inherited from class uk.ac.lancs.relate.trigger.conditions.ZoneCondition
defineActiveTrackable, defineInvolvedTrackables, getNrTrackablesInZone, getZone, inZone, setZone
 
Methods inherited from class uk.ac.lancs.relate.trigger.conditions.Condition
addInvolvedTrackable, addInvolvedTrackable, getActiveTrackable, getApp, getInvolvedTrackables, getTrackableById, setActiveTrackable, setApp, setInvolvedTrackables
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApproachingInZone

public ApproachingInZone(java.lang.String id1,
                         Zone zone,
                         java.lang.String deviceId)
Creates a new condition for a given application, user id and zone.

Parameters:
id1 - unique id of the active trackable, normally the user
zone - zone
Method Detail

evaluate

public boolean evaluate()
Return true if the condition is fulfilled, else false.

Overrides:
evaluate in class ZoneCondition
Returns:
true if the condition is fulfilled, else false