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);
	}
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.

@param type the Class type that defined the type of the result
@param obj  the value to be compared with.
@return true when objects are equal and false otherwise.

@see TypeConverter#toType(Class, Object)