no.sesat.search.query.token
Class DeadTokenEvaluationEngineImpl

java.lang.Object
  extended by no.sesat.search.query.token.TokenEvaluationEngineImpl
      extended by no.sesat.search.query.token.DeadTokenEvaluationEngineImpl
All Implemented Interfaces:
TokenEvaluationEngine

public final class DeadTokenEvaluationEngineImpl
extends TokenEvaluationEngineImpl

A dead evaluation engine. Used when evaluation is turned off. Rather than solely relying on the ALWAYS_FALSE_EVALUTOR evaluate(..) always throws a EvaluationRuntimeException that is treated as a false evaluation but also prevents the evaluation for being cached by clauses (which are implemented within the flyweight pattern).

Version:
$Id: DeadTokenEvaluationEngineImpl.java 7225 2009-04-09 00:32:20Z ssmiweve $

Nested Class Summary
 
Nested classes/interfaces inherited from interface no.sesat.search.query.token.TokenEvaluationEngine
TokenEvaluationEngine.Context, TokenEvaluationEngine.State
 
Field Summary
 
Fields inherited from interface no.sesat.search.query.token.TokenEvaluationEngine
ALWAYS_FALSE_EVALUATOR, ALWAYS_TRUE_EVALUATOR, DEAD_EVALUATOR
 
Constructor Summary
DeadTokenEvaluationEngineImpl(TokenEvaluationEngine.Context cxt)
           
 
Method Summary
 boolean evaluate(TokenPredicate token)
          The real evaluation method all other evaluate...(..) methods will delegate to.
 TokenEvaluator getEvaluator(TokenPredicate token)
          Find or create the TokenEvaluator that will evaluate if given (Token)Predicate is true.
 
Methods inherited from class no.sesat.search.query.token.TokenEvaluationEngineImpl
evaluateClause, evaluateQuery, evaluateTerm, getQueryString, getSite, getState, setState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeadTokenEvaluationEngineImpl

public DeadTokenEvaluationEngineImpl(TokenEvaluationEngine.Context cxt)
Method Detail

getEvaluator

public TokenEvaluator getEvaluator(TokenPredicate token)
                            throws EvaluationException
Description copied from interface: TokenEvaluationEngine
Find or create the TokenEvaluator that will evaluate if given (Token)Predicate is true.

Specified by:
getEvaluator in interface TokenEvaluationEngine
Overrides:
getEvaluator in class TokenEvaluationEngineImpl
Returns:
Throws:
EvaluationException - if something goes wrong constructing or finding an appropriate evaluator.

evaluate

public boolean evaluate(TokenPredicate token)
Description copied from interface: TokenEvaluationEngine
The real evaluation method all other evaluate...(..) methods will delegate to.

Specified by:
evaluate in interface TokenEvaluationEngine
Overrides:
evaluate in class TokenEvaluationEngineImpl
Returns:


Copyright © 2005-2009 Schibsted ASA. All Rights Reserved.