|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.ac.lancs.relate.trigger.conditions.Condition
public abstract class Condition
A condition contains a evaluate method, which returns a boolean expression. The evaluate method must not have any parameters since it is called generically. Thus the parameters have to be set in the constructor of the condition object. The condition object partly redesigned in this version. Indeed, it was required in order for since the SCT (Spatial Condition Toolkit) to accept rules based on runtime objects (Trackables) instead of compile time Trackables as it was before the refactoring process.
| Constructor Summary | |
|---|---|
Condition()
|
|
| Method Summary | |
|---|---|
protected void |
addInvolvedTrackable(java.lang.String id)
Adds a trackable to the list of objects that play a role in this condition. |
void |
addInvolvedTrackable(Trackable trackable)
Adds a trackable to the list of objects that play a role in this condition. |
abstract void |
defineActiveTrackable()
This method defines part of what should be done before evaluating a condition. |
abstract void |
defineInvolvedTrackables()
This method defines part of what should be done before evaluating a condition. |
abstract boolean |
evaluate()
This method defines the condition. |
Trackable |
getActiveTrackable()
Returns the active activeTrackable, normally the user. |
Application |
getApp()
Get the application needed to provide access to all other trackables. |
java.util.ArrayList<Trackable> |
getInvolvedTrackables()
Returns a list of all trackables that play a role in this condition |
protected Trackable |
getTrackableById(java.lang.String id)
Gets the Trackable corresponding to the provided id. |
protected void |
setActiveTrackable(java.lang.String id)
Sets the active activeTrackable, normally the user. |
void |
setApp(Application app)
Set the application needed to provide access to all other trackables. |
protected void |
setInvolvedTrackables(java.util.ArrayList<Trackable> involvedTrackables)
Sets the list of all trackables that play a role in this condition |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Condition()
| Method Detail |
|---|
public abstract boolean evaluate()
public abstract void defineInvolvedTrackables()
public abstract void defineActiveTrackable()
public Application getApp()
public void setApp(Application app)
public Trackable getActiveTrackable()
protected void setActiveTrackable(java.lang.String id)
id - of the active activeTrackable, normally the userpublic java.util.ArrayList<Trackable> getInvolvedTrackables()
protected void setInvolvedTrackables(java.util.ArrayList<Trackable> involvedTrackables)
involvedTrackables - involved trackablesprotected void addInvolvedTrackable(java.lang.String id)
id - of the trackable to add.public void addInvolvedTrackable(Trackable trackable)
trackable - trackable to add to the listprotected Trackable getTrackableById(java.lang.String id)
unique - identifier of the trackable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||