com.sun.labs.minion.query
Class And

java.lang.Object
  extended by com.sun.labs.minion.query.Element
      extended by com.sun.labs.minion.query.Operator
          extended by com.sun.labs.minion.query.And
All Implemented Interfaces:
java.lang.Iterable<Element>

public class And
extends Operator

A boolean and operator


Field Summary
 
Fields inherited from class com.sun.labs.minion.query.Operator
elements
 
Fields inherited from class com.sun.labs.minion.query.Element
fields, strict
 
Constructor Summary
And()
          Creates an empty and operator.
And(java.util.Collection<Element> elements)
          Creates an and operator that will operate on the provided elements.
And(Element... elements)
          Creates an and operator that will opearate on the provided elements.
 
Method Summary
 QueryElement getQueryElement()
          Transduces this query element into a "real" query element, one that can be evaluated by the search engine.
 
Methods inherited from class com.sun.labs.minion.query.Operator
add, getOperands, iterator
 
Methods inherited from class com.sun.labs.minion.query.Element
addField, getFields, getStrict, setFields, setStrict
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

And

public And()
Creates an empty and operator. This would evaluate to an empty set of documents.


And

public And(java.util.Collection<Element> elements)
Creates an and operator that will operate on the provided elements.

Parameters:
elements - the elements that should be anded together. A document will appear in the result set for this operator only if it appears in the result sets of all of the provided elements.

And

public And(Element... elements)
Creates an and operator that will opearate on the provided elements.

Parameters:
elements - the elements that should be anded together.
Method Detail

getQueryElement

public QueryElement getQueryElement()
Description copied from class: Element
Transduces this query element into a "real" query element, one that can be evaluated by the search engine.

Specified by:
getQueryElement in class Element
Returns:
an evaluatable query element.