net.ontopia.utils
Class CachedDecider

java.lang.Object
  extended by net.ontopia.utils.CachedDecider
All Implemented Interfaces:
CachedIF, DeciderIF

public class CachedDecider
extends java.lang.Object
implements DeciderIF, CachedIF

INTERNAL: Decider that maintains a cache of decisions made on a set of objects. It works with any implementation of DeciderIF.

The cache is first checked to see if a decision has already been made. Otherwise a new decision is evaluated and the cache is updated.


Constructor Summary
CachedDecider(DeciderIF decider)
           
 
Method Summary
 DeciderIF getDecider()
          Gets the decider that being cached.
 boolean ok(java.lang.Object object)
          PUBLIC: Returns true if the object is accepted.
 void refresh()
          Refreshes the cache.
 void setDecider(DeciderIF decider)
          Sets the decider that is to be cached.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachedDecider

public CachedDecider(DeciderIF decider)
Method Detail

getDecider

public DeciderIF getDecider()
Gets the decider that being cached.


setDecider

public void setDecider(DeciderIF decider)
Sets the decider that is to be cached.


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

refresh

public void refresh()
Description copied from interface: CachedIF
Refreshes the cache.

Specified by:
refresh in interface CachedIF


Copyright © 2000-2010 Ontopia.