net.ontopia.utils
Class OrDecider

java.lang.Object
  extended by net.ontopia.utils.OrDecider
All Implemented Interfaces:
DeciderIF

public class OrDecider
extends java.lang.Object
implements DeciderIF

INTERNAL: Decider that checks all subdeciders and returns true of one of them gives a positive decision.

Note that the decision is shortcircuited when the first decider gives a positive decision, the rest is then not checked.


Field Summary
protected  java.util.Set deciders
           
 
Constructor Summary
OrDecider(DeciderIF decider)
           
OrDecider(java.util.Set deciders)
           
 
Method Summary
 void addDecider(DeciderIF decider)
          Add a subdecider.
 java.util.Set getDeciders()
          Gets the subdeciders.
 boolean ok(java.lang.Object object)
          PUBLIC: Returns true if the object is accepted.
 void removeDecider(DeciderIF decider)
          Remove a subdecider.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

deciders

protected java.util.Set deciders
Constructor Detail

OrDecider

public OrDecider(DeciderIF decider)

OrDecider

public OrDecider(java.util.Set deciders)
Method Detail

getDeciders

public java.util.Set getDeciders()
Gets the subdeciders.


addDecider

public void addDecider(DeciderIF decider)
Add a subdecider.


removeDecider

public void removeDecider(DeciderIF decider)
Remove a subdecider.


ok

public boolean ok(java.lang.Object object)
Description copied from interface: DeciderIF
PUBLIC: Returns true if the object is accepted.

Specified by:
ok in interface DeciderIF


Copyright © 2000-2012 Ontopia.