public class SubsumedCondition extends java.lang.Object implements HGQueryCondition, HGAtomPredicate
The SubsumedCondition
examines a given atom and is satisfied
if that atom is subsumed by the atom specified in the condition. You can also
provide a value instead of a HyperGraph handle by using the SubsumedCondition(Object)
constructor.
Constructor and Description |
---|
SubsumedCondition() |
SubsumedCondition(HGHandle general) |
SubsumedCondition(java.lang.Object generalValue) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
declaredSubsumption(HyperGraph graph,
HGHandle general,
HGHandle specific) |
boolean |
equals(java.lang.Object x) |
HGHandle |
getGeneralHandle() |
Ref<HGHandle> |
getGeneralHandleReference() |
java.lang.Object |
getGeneralValue() |
protected HGHandle |
getTypeFor(HyperGraph graph,
HGHandle h) |
protected HGHandle |
getTypeFor(HyperGraph graph,
java.lang.Object atom) |
int |
hashCode() |
boolean |
satisfies(HyperGraph hg,
HGHandle specific)
Check whether a given
Object satisfies this
query condition. |
void |
setGeneralHandle(HGHandle general) |
void |
setGeneralHandleReference(Ref<HGHandle> general) |
void |
setGeneralValue(java.lang.Object generalValue) |
public SubsumedCondition()
public SubsumedCondition(java.lang.Object generalValue)
public SubsumedCondition(HGHandle general)
public HGHandle getGeneralHandle()
public void setGeneralHandle(HGHandle general)
public java.lang.Object getGeneralValue()
public void setGeneralValue(java.lang.Object generalValue)
public final boolean satisfies(HyperGraph hg, HGHandle specific)
HGAtomPredicate
Check whether a given Object
satisfies this
query condition.
satisfies
in interface HGAtomPredicate
hg
- The HyperGraph
instance.specific
- 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
protected final HGHandle getTypeFor(HyperGraph graph, HGHandle h)
protected final HGHandle getTypeFor(HyperGraph graph, java.lang.Object atom)
protected final boolean declaredSubsumption(HyperGraph graph, HGHandle general, HGHandle specific)