no.sesat.search.query.finder
Class Counter
java.lang.Object
no.sesat.commons.visitor.AbstractReflectionVisitor
no.sesat.search.query.finder.Counter
- All Implemented Interfaces:
- Serializable, no.sesat.commons.visitor.Visitor
public final class Counter
- extends no.sesat.commons.visitor.AbstractReflectionVisitor
- implements Serializable
Simple visitor used to count the number of leaves under a given clause.
- Version:
- $Id: Counter.java 7225 2009-04-09 00:32:20Z ssmiweve $
- See Also:
- Serialized Form
| Fields inherited from class no.sesat.commons.visitor.AbstractReflectionVisitor |
VISIT_METHOD_IMPL |
| Methods inherited from class no.sesat.commons.visitor.AbstractReflectionVisitor |
visit, visitImpl |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Counter
public Counter()
getTermCount
public int getTermCount(Clause root)
- Get the count of leaves under this clause.
Subsequent calls with the same argument will return a cached result.
- Parameters:
root - the clause to count leaves within
- Returns:
- the number of LeafClauses found under the root clause.
visitImpl
protected void visitImpl(UnaryClause clause)
- Parameters:
clause -
visitImpl
protected void visitImpl(XorClause clause)
- Parameters:
clause -
visitImpl
protected void visitImpl(BinaryClause clause)
- Parameters:
clause -
visitImpl
protected void visitImpl(LeafClause clause)
- Parameters:
clause -
Copyright © 2005-2009 Schibsted ASA. All Rights Reserved.