站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss RULES 3.0.6 API 英文版文档

IdentityAssertMapComparator - JBoss RULES 3.0.6 API 英文版文档


org.drools.common
Class IdentityAssertMapComparator

java.lang.Object
  extended by org.drools.util.FastComparator
      extended by org.drools.common.IdentityAssertMapComparator
All Implemented Interfaces:
java.io.Serializable, java.util.Comparator

public class IdentityAssertMapComparator
extends FastComparator

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.drools.util.FastComparator
DEFAULT, DIRECT, IDENTITY, LEXICAL, REHASH, REHASH_SYSTEM_HASHCODE
 
Constructor Summary
IdentityAssertMapComparator(java.lang.Class factHandleClass)
           
 
Method Summary
 boolean areEqual(java.lang.Object o1, java.lang.Object o2)
          Special comparator that allows FactHandles to be keys, but always checks like for like.
 int compare(java.lang.Object o1, java.lang.Object o2)
          Compares the specified objects for order.
 int hashCodeOf(java.lang.Object obj)
          Returns the hash code for the specified object (consistent with FastComparator.areEqual(java.lang.Object, java.lang.Object)).
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

IdentityAssertMapComparator

public IdentityAssertMapComparator(java.lang.Class factHandleClass)
Method Detail

hashCodeOf

public int hashCodeOf(java.lang.Object obj)
Description copied from class: FastComparator
Returns the hash code for the specified object (consistent with FastComparator.areEqual(java.lang.Object, java.lang.Object)). Two objects considered equal have the same hash code.

Specified by:
hashCodeOf in class FastComparator
Parameters:
obj - the object to return the hashcode for.
Returns:
the hashcode for the specified object.

areEqual

public boolean areEqual(java.lang.Object o1,
                        java.lang.Object o2)
Special comparator that allows FactHandles to be keys, but always checks like for like.

Specified by:
areEqual in class FastComparator
Parameters:
o1 - the first object (or null).
o2 - the second object (or null).
Returns:
true if both objects are considered equal; false otherwise.

compare

public int compare(java.lang.Object o1,
                   java.lang.Object o2)
Description copied from class: FastComparator
Compares the specified objects for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

Specified by:
compare in interface java.util.Comparator
Specified by:
compare in class FastComparator
Parameters:
o1 - the first object.
o2 - the second object.
Returns:
a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

toString

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