public class LinkCondition extends Object implements HGQueryCondition, HGAtomPredicate
A LinkCondition constraints the query result set to links
pointing to a target set of atoms. The target set is specified when
the condition is constructed through an array of HGHandles.
| Constructor and Description |
|---|
LinkCondition() |
LinkCondition(Collection<HGHandle> targets) |
LinkCondition(HGHandle... targets) |
LinkCondition(HGLink link) |
LinkCondition(Ref<HGHandle>... targets) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(HGHandle h) |
boolean |
equals(Object x) |
Set<Ref<HGHandle>> |
getTargetSet() |
int |
hashCode() |
boolean |
satisfies(HyperGraph graph,
HGHandle handle)
Return
true if handle points to a link whose
target set is a superset of this condition's targetSet. |
void |
setTargetSet(Set<Ref<HGHandle>> targetSet) |
Set<Ref<HGHandle>> |
targets() |
String |
toString() |
public LinkCondition()
public LinkCondition(HGLink link)
public LinkCondition(HGHandle... targets)
public LinkCondition(Collection<HGHandle> targets)
public boolean contains(HGHandle h)
public boolean satisfies(HyperGraph graph, HGHandle handle)
Return true if handle points to a link whose
target set is a superset of this condition's targetSet.
satisfies in interface HGAtomPredicategraph - 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.Copyright © 2015. All rights reserved.