return ( (Comparable) obj1 ).compareTo( obj2 );
Comparable comp1 = (Comparable) obj1; Comparable comp2 = (Comparable) obj2;   if ( obj1.getClass( ) != obj2.getClass( ) && obj1 instanceof Number && obj2 instanceof Number ) { try { comp1 = (Comparable) DataTypeUtil.toDouble( obj1 ); comp2 = (Comparable) DataTypeUtil.toDouble( obj2 ); } catch ( BirtException ex ) {  } }  return comp1.compareTo( comp2 );
	private int compareTwoValues( Object obj1, Object obj2 )	{		if ( obj1 == null || obj2 == null )		{			// all non-null values are greater than null value			if ( obj1 == null && obj2 != null )				return -1;			else if ( obj1 != null && obj2 == null )				return 1;			else				return 0;		}		if ( obj1 instanceof Boolean )		{			if ( obj1.equals( obj2 ) )				return 0;			Boolean bool = (Boolean) obj1;			if ( bool.equals( Boolean.TRUE ) )				return 1;			else				return -1;		}		else if ( obj1 instanceof Comparable )		{			return ( (Comparable) obj1 ).compareTo( obj2 );		}		else		{			return obj1.toString( ).compareTo( obj2.toString( ) );		}	}