public < T > boolean equalsAs ( Class < T > type , Object obj ) { if ( obj == null && _value == null ) return true ; if ( obj == null || _value == null ) return false ; if ( obj instanceof AnyValue ) obj = ( ( AnyValue ) obj ) . _value ; T typedThisValue = TypeConverter . toType ( type , _value ) ; T typedValue = TypeConverter . toType ( type , obj ) ; if ( typedThisValue == null && typedValue == null ) return true ; if ( typedThisValue == null || typedValue == null ) return false ; return typedThisValue . equals ( typedValue ) ; }
Compares this object value to specified specified value . When direct comparison gives negative results it converts values to type specified by type code and compare them again .