no.sesat.search.query.token
Class AbstractTokenPredicate

java.lang.Object
  extended by no.sesat.search.query.token.AbstractTokenPredicate
All Implemented Interfaces:
Serializable, TokenPredicate, org.apache.commons.collections.Predicate
Direct Known Subclasses:
ExactTokenPredicateImpl, TokenPredicateImpl

public abstract class AbstractTokenPredicate
extends Object
implements TokenPredicate

Base class helping with equals, hashcode, and toString overrides which all TokenPredicate implementations share. Based off the requirement that TokenPredicate, of any implementation, have a unique name.

Version:
$Id: AbstractTokenPredicate.java 7225 2009-04-09 00:32:20Z ssmiweve $
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface no.sesat.search.query.token.TokenPredicate
EXACT_PREFIX
 
Constructor Summary
AbstractTokenPredicate()
           
 
Method Summary
 boolean equals(Object obj)
           
 boolean evaluate(Object evalFactory)
          Evaluates to true if fastListName occurs in the query.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface no.sesat.search.query.token.TokenPredicate
exactPeer, name
 

Constructor Detail

AbstractTokenPredicate

public AbstractTokenPredicate()
Method Detail

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

evaluate

public boolean evaluate(Object evalFactory)
Description copied from interface: TokenPredicate
Evaluates to true if fastListName occurs in the query. This method uses a TokenEvaluationEngine to get a TokenEvaluator. This method can only be called from the RunningQuery thread, not spawned search commands.

Specified by:
evaluate in interface TokenPredicate
Specified by:
evaluate in interface org.apache.commons.collections.Predicate
Parameters:
evalFactory - The TTokenEvaluationEngineused to get a TokenEvaluator for this fastListName, AND to get the current term in the query being tokenised.
Returns:
true if, according to the TokenEvaluator provided by the TokTokenEvaluationEngineastListName evaluates to true.


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