public abstract class RefinerBuilder<T>
extends java.lang.Object
| Modifier | Constructor and Description | 
|---|---|
protected  | 
RefinerBuilder(QName name)
Constructs a RefinerBuilder with a qualified name. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
consumeRow(Row row)
Use the stored column name to access the column value 
 and convert it to T and visit that T value. 
 | 
protected abstract T | 
convert(java.lang.Object value)
Method used by subclasses to convert any Object into an
 Object of type T. 
 | 
protected abstract Refiner<T> | 
createRefiner(QName column,
             java.util.Map<T,java.lang.Integer> counters)
Creates a Refiner with the column name and a map of counters
 for each entry of type T. 
 | 
Refiner<T> | 
getRefiner()
Gets the newly created Refiner. 
 | 
void | 
visit(T value)
Visits a T value that increments the count. 
 | 
void | 
visit(T value,
     int count)
Visits a T value and increase by the count 
 | 
protected RefinerBuilder(QName name)
name - the name to associate with the eventual 
 Refiner builtpublic void visit(T value)
value - a T value that we are keeping a count ofpublic void visit(T value, int count)
value - a T value that we are keeping a count ofcount - increase by the countpublic void consumeRow(Row row)
row - a Row in a QueryResult<Row>public Refiner<T> getRefiner()
protected abstract Refiner<T> createRefiner(QName column, java.util.Map<T,java.lang.Integer> counters)
column - a QName signifying the column to navigate overcounters - a Map of counters, one for each T value encounteredprotected abstract T convert(java.lang.Object value)
value - an arbitrary Object that can be converted
 to type T