public class LinkCondition extends java.lang.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 HGHandle
s.
Constructor and Description |
---|
LinkCondition() |
LinkCondition(java.util.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(java.lang.Object x) |
java.util.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(java.util.Set<Ref<HGHandle>> targetSet) |
java.util.Set<Ref<HGHandle>> |
targets() |
java.lang.String |
toString() |
public LinkCondition()
public LinkCondition(HGLink link)
public LinkCondition(HGHandle... targets)
public LinkCondition(java.util.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 HGAtomPredicate
graph
- 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 int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object x)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object