org.databene.benerator.engine.expression
Class CachedExpression<E>

java.lang.Object
  extended by org.databene.script.expression.ExpressionAdapter<E,E>
      extended by org.databene.script.expression.ExpressionProxy<E>
          extended by org.databene.benerator.engine.expression.CachedExpression<E>
All Implemented Interfaces:
org.databene.script.Expression<E>

public class CachedExpression<E>
extends org.databene.script.expression.ExpressionProxy<E>

Caches the result of another expression and returns it on subsequent calls without evaluating the other expression again. The cache can be invalidated by calling the invalidate() method.

Created: 21.10.2009 14:42:15

Since:
0.6.0
Author:
Volker Bergmann

Field Summary
 
Fields inherited from class org.databene.script.expression.ExpressionAdapter
source
 
Constructor Summary
CachedExpression(org.databene.script.Expression<E> realExpression)
           
 
Method Summary
 E evaluate(org.databene.commons.Context context)
           
 void invalidate()
           
 
Methods inherited from class org.databene.script.expression.ExpressionAdapter
isConstant
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachedExpression

public CachedExpression(org.databene.script.Expression<E> realExpression)
Method Detail

evaluate

public E evaluate(org.databene.commons.Context context)
Specified by:
evaluate in interface org.databene.script.Expression<E>
Overrides:
evaluate in class org.databene.script.expression.ExpressionProxy<E>

invalidate

public void invalidate()


Copyright © 2013. All Rights Reserved.