SimJava
v2.0

eduni.simjava
Class Sim_predicate

java.lang.Object
  |
  +--eduni.simjava.Sim_predicate
Direct Known Subclasses:
Sim_any_p, Sim_from_p, Sim_none_p, Sim_not_from_p, Sim_not_type_p, Sim_type_p

public abstract class Sim_predicate
extends java.lang.Object

Predicates are used to select events from the deferred queue. This class is abstract and must be subclassed when writing a new predicate. Some standard predicates are provided, see below:

See Also:
Sim_type_p, Sim_from_p, Sim_any_p, Sim_none_p, Sim_system

Constructor Summary
Sim_predicate()
           
 
Method Summary
abstract  boolean match(Sim_event event)
          The match function which must be overidden when writing a new predicate.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Sim_predicate

public Sim_predicate()
Method Detail

match

public abstract boolean match(Sim_event event)
The match function which must be overidden when writing a new predicate. The function is called with each event in the deferred queue as its parameter when a Sim_system.sim_select() call is made by the user.
Parameters:
event - The event to test for a match.
Returns:
The function should return true if the event matches and should be selected, of false if it doesn't

SimJava
v2.0

The University of Edinburgh, 2002