public boolean equal ( final Object o1 , final Object o2 ) { if ( o1 instanceof InternalFactHandle ) { return ( ( InternalFactHandle ) o1 ) . getId ( ) == ( ( InternalFactHandle ) o2 ) . getId ( ) ; } Object left = o1 ; final InternalFactHandle handle = ( ( InternalFactHandle ) o2 ) ; if ( left == handle . getObject ( ) ) { return true ; } else if ( handle . getTraitType ( ) == TraitTypeEnum . WRAPPED_TRAITABLE ) { return left == ( ( CoreWrapper ) handle . getObject ( ) ) . getCore ( ) ; } else { return false ; } }
Special comparator that allows FactHandles to be keys but always checks like for like .