org.hypergraphdb.query
Class IncidentCondition

java.lang.Object
  extended by org.hypergraphdb.query.IncidentCondition
All Implemented Interfaces:
HGAtomPredicate, HGQueryCondition

public class IncidentCondition
extends java.lang.Object
implements HGQueryCondition, HGAtomPredicate

The IncidentCondition specifies that a search result atom should be a member of the incidence set of a given atom. By itself the condition would yield a query that enumerates all links pointing to the specified atom.

Author:
Borislav Iordanov

Constructor Summary
IncidentCondition()
           
IncidentCondition(HGHandle target)
           
 
Method Summary
 boolean equals(java.lang.Object x)
           
 HGHandle getTarget()
           
 int hashCode()
           
 boolean satisfies(HyperGraph hg, HGHandle handle)
          Check whether a given Object satisfies this query condition.
 void setTarget(HGHandle target)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IncidentCondition

public IncidentCondition()

IncidentCondition

public IncidentCondition(HGHandle target)
Method Detail

getTarget

public HGHandle getTarget()

setTarget

public void setTarget(HGHandle target)

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.

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

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object