serf.data
Class ExistentialBooleanComparator

java.lang.Object
  extended by serf.data.ExistentialBooleanComparator

public class ExistentialBooleanComparator
extends java.lang.Object

ExistentialBooleanComparator compares two attributes by comparing their attribute values.


Constructor Summary
ExistentialBooleanComparator(AtomicMatch am)
           
 
Method Summary
 boolean attributesMatch(Attribute p1, Attribute p2)
           
static boolean attributesMatch(Attribute p1, Attribute p2, AtomicMatch vm)
          Compare two attributes.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExistentialBooleanComparator

public ExistentialBooleanComparator(AtomicMatch am)
Method Detail

attributesMatch

public boolean attributesMatch(Attribute p1,
                               Attribute p2)

attributesMatch

public static boolean attributesMatch(Attribute p1,
                                      Attribute p2,
                                      AtomicMatch vm)
Compare two attributes. Return true if they match. attributesMatch takes the cross product of values from each Attribute and invokes valuesMatch() on each pair. It returns true if any invocation of valuesMatch returns true.

Parameters:
p1 - Attribute 1
p1 - Attribute 2
vm - an object that compares Attribute values.
Returns:
true if any pair of attribute values matches. Note: if either Attribute parameter is null this method returns false.