org.hypergraphdb.query
Class AtomValueCondition

java.lang.Object
  extended by org.hypergraphdb.query.SimpleValueCondition
      extended by org.hypergraphdb.query.AtomValueCondition
All Implemented Interfaces:
HGAtomPredicate, HGQueryCondition
Direct Known Subclasses:
TypedValueCondition, ValueAsPredicateOnly

public class AtomValueCondition
extends SimpleValueCondition

The AtomValueCondition represents a query condition on the atom value. The condition specifies a comparison operator and value to compare against. The possible comparison operators are the constants listed in the ComparisonOperator class. The value compared against must be of a recognizable HGAtomType.

Author:
Borislav Iordanov

Constructor Summary
AtomValueCondition()
           
AtomValueCondition(java.lang.Object value)
           
AtomValueCondition(java.lang.Object value, ComparisonOperator operator)
           
 
Method Summary
 boolean equals(java.lang.Object x)
           
 int hashCode()
           
 boolean satisfies(HyperGraph hg, HGHandle handle)
          Check whether a given Object satisfies this query condition.
 java.lang.String toString()
           
 
Methods inherited from class org.hypergraphdb.query.SimpleValueCondition
getOperator, getValue, setOperator, setValue
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AtomValueCondition

public AtomValueCondition()

AtomValueCondition

public AtomValueCondition(java.lang.Object value)

AtomValueCondition

public AtomValueCondition(java.lang.Object value,
                          ComparisonOperator operator)
Method Detail

satisfies

public boolean satisfies(HyperGraph hg,
                         HGHandle handle)
Description copied from interface: HGAtomPredicate

Check whether a given Object satisfies this query condition.

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 SimpleValueCondition

equals

public boolean equals(java.lang.Object x)
Overrides:
equals in class SimpleValueCondition