org.hypergraphdb.query
Class OrderedLinkCondition
java.lang.Object
org.hypergraphdb.query.OrderedLinkCondition
- All Implemented Interfaces:
- HGAtomPredicate, HGQueryCondition
public class OrderedLinkCondition
- extends java.lang.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 HGHandles. 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.
- Author:
- Borislav Iordanov
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
OrderedLinkCondition
public OrderedLinkCondition()
OrderedLinkCondition
public OrderedLinkCondition(HGHandle[] targetSet)
targets
public HGHandle[] targets()
getTargets
public HGHandle[] getTargets()
setTargets
public void setTargets(HGHandle[] targetSet)
setTarget
public void setTarget(int pos,
HGHandle newTarget)
satisfies
public boolean satisfies(HyperGraph hg,
HGHandle handle)
- Description copied from interface:
HGAtomPredicate
Check whether a given Object satisfies this
query condition.
- Specified by:
satisfies in interface HGAtomPredicate
- Parameters:
hg - The HyperGraph instance.handle - The atom on which to test the query condition.
- Returns:
true if the passed in parameter satisfies
the condition and false otherwise.
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
equals
public boolean equals(java.lang.Object x)
- Overrides:
equals in class java.lang.Object