org.drools.common
Class EqualityKeyComparator

java.lang.Object
  extended by org.drools.common.EqualityKeyComparator
All Implemented Interfaces:
Externalizable, Serializable, AbstractHashTable.ObjectComparator

public class EqualityKeyComparator
extends Object
implements AbstractHashTable.ObjectComparator

See Also:
Serialized Form

Constructor Summary
EqualityKeyComparator()
           
 
Method Summary
 int compare(Object o1, Object o2)
           
 boolean equal(Object o1, Object o2)
          Equality key reverses the compare, so that the key controls the comparison
static EqualityKeyComparator getInstance()
           
 int hashCodeOf(Object key)
           
 void readExternal(ObjectInput in)
           
 int rehash(int h)
           
 String toString()
           
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EqualityKeyComparator

public EqualityKeyComparator()
Method Detail

getInstance

public static EqualityKeyComparator getInstance()

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

hashCodeOf

public int hashCodeOf(Object key)
Specified by:
hashCodeOf in interface AbstractHashTable.ObjectComparator

rehash

public int rehash(int h)
Specified by:
rehash in interface AbstractHashTable.ObjectComparator

equal

public boolean equal(Object o1,
                     Object o2)
Equality key reverses the compare, so that the key controls the comparison

Specified by:
equal in interface AbstractHashTable.ObjectComparator

compare

public int compare(Object o1,
                   Object o2)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2001-2013 JBoss Inc.. All Rights Reserved.