net.ontopia.utils
Class AndDecider<T>

java.lang.Object
  extended by net.ontopia.utils.AndDecider<T>
All Implemented Interfaces:
DeciderIF<T>

public class AndDecider<T>
extends java.lang.Object
implements DeciderIF<T>

INTERNAL: Decider that checks all subdeciders and returns true if all of them gives a positive decision. Note that the decision is shortcircuited when the first decider gives a negative decision, the rest is then not checked.


Field Summary
protected  java.util.Collection<DeciderIF<T>> deciders
           
 
Constructor Summary
AndDecider(java.util.Collection<DeciderIF<T>> deciders)
           
 
Method Summary
 void addDecider(DeciderIF<T> decider)
          Add a subdecider.
 java.util.Collection<DeciderIF<T>> getDeciders()
          Gets the subdeciders.
 boolean ok(T object)
          PUBLIC: Returns true if the object is accepted.
 void removeDecider(DeciderIF<T> 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.Collection<DeciderIF<T>> deciders
Constructor Detail

AndDecider

public AndDecider(java.util.Collection<DeciderIF<T>> deciders)
Method Detail

getDeciders

public java.util.Collection<DeciderIF<T>> getDeciders()
Gets the subdeciders.


addDecider

public void addDecider(DeciderIF<T> decider)
Add a subdecider.


removeDecider

public void removeDecider(DeciderIF<T> decider)
Remove a subdecider.


ok

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

Specified by:
ok in interface DeciderIF<T>


Copyright © 2000-2012 Ontopia.