public final class PredicateBasedFilter<T> extends HGQuery<T> implements Iterable<HGQuery<T>>
A HGQuery
whose result is constructed by filtering the result set
of another HGQuery
according to a HGQueryCondition
.
HGQuery.hg
Constructor and Description |
---|
PredicateBasedFilter(HyperGraph graph,
HGQuery<T> query,
HGAtomPredicate atomPredicate)
Construct a
PredicateBasedFilter , filtering the result
set of a given query based on a HGQueryCondition . |
PredicateBasedFilter(HyperGraph graph,
HGQuery<T> query,
Mapping<T,Boolean> predicate) |
Modifier and Type | Method and Description |
---|---|
HGSearchResult<T> |
execute()
Execute the query and return the result set.
|
HGQuery<T> |
getQuery() |
Iterator<HGQuery<T>> |
iterator() |
compile, findAll, findInSet, findOne, getHyperGraph, initialValue, initialVar, make, make, NOP, setHyperGraph, var, var
public PredicateBasedFilter(HyperGraph graph, HGQuery<T> query, HGAtomPredicate atomPredicate)
Construct a PredicateBasedFilter
, filtering the result
set of a given query based on a HGQueryCondition
.
query
- The base query that is being filtered.predicate
- The filtering predicate.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).
Copyright © 2015. All rights reserved.