|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hypergraphdb.query.impl.RABasedPredicate
public class RABasedPredicate
Make a random access result set as a predicate. Random access result sets don't always have a constant time (like "true" random access structures), but are always assumed to have at least sublinear time. In other words, their goTo method should have complexity smaller than O(N). In practice, RA sets are usually B-Tree or "B-Forests" accessed in O(logN).
If an RABasedPredicate is initialized with a HGQuery
instead of a result set, the query will be executed the first time satisfies
is called.
The close method will only close the result set if this RABasedPredicate
was created by calling the HGQuery based constructor.
| Constructor Summary | |
|---|---|
RABasedPredicate(HGQuery query)
|
|
RABasedPredicate(HGRandomAccessResult ras)
|
|
| Method Summary | |
|---|---|
void |
close()
|
boolean |
satisfies(HyperGraph hg,
HGHandle handle)
Return true if handle is a member of
the HGRandomAccessResult set on which this predicate
is based. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RABasedPredicate(HGRandomAccessResult ras)
public RABasedPredicate(HGQuery query)
| Method Detail |
|---|
public boolean satisfies(HyperGraph hg,
HGHandle handle)
Return true if handle is a member of
the HGRandomAccessResult set on which this predicate
is based. Return false otherwise.
satisfies in interface HGAtomPredicatehg - The HyperGraph instance.handle - The atom on which to test the query condition.
true if the passed in parameter satisfies
the condition and false otherwise.public void close()
close in interface CloseMe
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||