public class IntersectionQuery<T> extends HGQuery<T> implements Iterable<HGQuery<T>>
An IntersectionQuery
combines the results of two underlying
queries and produces a result set containing only elements that appear
in both of the input result sets.
HGQuery.hg
Constructor and Description |
---|
IntersectionQuery(HGQuery<T> left,
HGQuery<T> right,
RSCombiner<T> combiner)
Construct an intersection of two queries.
|
Modifier and Type | Method and Description |
---|---|
HGSearchResult<T> |
execute()
Execute the query and return the result set.
|
RSCombiner<T> |
getCombiner() |
HGQuery<T> |
getLeft() |
HGQuery<T> |
getRight() |
Iterator<HGQuery<T>> |
iterator() |
void |
setCombiner(RSCombiner<T> combiner) |
void |
setLeft(HGQuery<T> left) |
void |
setRight(HGQuery<T> right) |
compile, findAll, findInSet, findOne, getHyperGraph, initialValue, initialVar, make, make, NOP, setHyperGraph, var, var
public HGSearchResult<T> execute()
HGQuery
Execute the query and return the result set. Note that queries are lazily executed so that
results are actually obtained when one iterates (using the next
and prev
of the returned object).
public RSCombiner<T> getCombiner()
public void setCombiner(RSCombiner<T> combiner)
Copyright © 2015. All rights reserved.