com.sun.labs.minion.retrieval
Class And

java.lang.Object
  extended by com.sun.labs.minion.retrieval.QueryElement
      extended by com.sun.labs.minion.retrieval.Operator
          extended by com.sun.labs.minion.retrieval.And
All Implemented Interfaces:
java.lang.Comparable

public class And
extends Operator


Field Summary
protected static java.lang.String logTag
           
 
Fields inherited from class com.sun.labs.minion.retrieval.Operator
operands
 
Fields inherited from class com.sun.labs.minion.retrieval.QueryElement
estSize, fieldMultipliers, inOrder, keepPositions, order, part, qc, qs, searchFieldNames, searchFields, strictEval, wc, wf
 
Constructor Summary
And(java.util.List operands)
          Constructs an AND operator that takes a list of operands.
 
Method Summary
protected static ArrayGroup and(ArrayGroup ag, java.util.List operands)
           
protected static ArrayGroup and(ArrayGroup ag, java.util.List operands, boolean strict)
          Runs an intersection of all of the given operands.
protected  int calculateEstimatedSize()
          Estimates the size of the results set.
 ArrayGroup eval(ArrayGroup ag)
          Evaluates this operator, returning the results.
 
Methods inherited from class com.sun.labs.minion.retrieval.Operator
addSearchFieldName, getOperands, getQueryTerms, setOperands, setPartition, setQueryConfig, setWeightingComponents, setWeightingFunction, toString, toString, toStringMod
 
Methods inherited from class com.sun.labs.minion.retrieval.QueryElement
compareTo, dump, estimateSize, getInOrder, getOrder, getQueryStats, getQueryTerms, getSearchFieldNames, setInOrder, setOrder, setQueryStats, setSearchFields
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

logTag

protected static java.lang.String logTag
Constructor Detail

And

public And(java.util.List operands)
Constructs an AND operator that takes a list of operands.

Method Detail

calculateEstimatedSize

protected int calculateEstimatedSize()
Estimates the size of the results set.

Specified by:
calculateEstimatedSize in class QueryElement
Returns:
The estimated size of the results set for this element. This is meant to be an as-tight-as-possible estimate of the results set size. It is acceptable to overestimate, but not to underestimate the size of the result set.

eval

public ArrayGroup eval(ArrayGroup ag)
Evaluates this operator, returning the results.

Overrides:
eval in class QueryElement

and

protected static ArrayGroup and(ArrayGroup ag,
                                java.util.List operands)

and

protected static ArrayGroup and(ArrayGroup ag,
                                java.util.List operands,
                                boolean strict)
Runs an intersection of all of the given operands. This can be used by other classes that want to do an intersection.

Parameters:
ag - Any initial group. May be null.
operands - The operands to process.