public class OrderedLinkCondition extends Object implements HGQueryCondition, HGAtomPredicate
A OrderedLinkCondition
constraints the query result set to ordered links
pointing to a target set of atoms. The target set is specified when
the condition is constructed through an array of HGHandle
s. This array
must have the targets in the desired order. Note that the targetSet
parameter
of this condition need only be a subset of the examined links' target sets. Thus a link
with an ordered target set of (a,b,c,d) would be satisfied by an OrderedLinkCondition
constructed with the target set (b,d) for example. If same arity is desired, the ArityCondition
should be used in conjunction with this one.
Constructor and Description |
---|
OrderedLinkCondition() |
OrderedLinkCondition(HGHandle... targetSet) |
OrderedLinkCondition(List<HGHandle> targetSet) |
OrderedLinkCondition(Ref<HGHandle>... targetSet) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object x) |
Ref<HGHandle>[] |
getTargets() |
int |
hashCode() |
boolean |
satisfies(HyperGraph hg,
HGHandle handle)
Check whether a given
Object satisfies this
query condition. |
void |
setTarget(int pos,
HGHandle newTarget) |
void |
setTargets(Ref<HGHandle>[] targetSet) |
Ref<HGHandle>[] |
targets() |
String |
toString() |
public OrderedLinkCondition()
public OrderedLinkCondition(HGHandle... targetSet)
public void setTarget(int pos, HGHandle newTarget)
public boolean satisfies(HyperGraph hg, HGHandle handle)
HGAtomPredicate
Check whether a given Object
satisfies this
query condition.
satisfies
in interface HGAtomPredicate
hg
- 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.