&& ob1 instanceof Comparable )
&& ob2 instanceof Comparable )
	public static int compareObjects( Object ob1, Object ob2 )	{		// default value is 0		int result = 0;				// 1: the case of reference is the same		if ( ob1 == ob2 )		{			return result;		}				// 2: the case of one of two object is null		if ( ob1 == null || ob2 == null )		{			// keep null value at the first position in ascending order			if ( ob1 == null )			{				result = -1;			}			else			{				result = 1;			}			return result;		}				// 3: other cases		if ( ob1.equals( ob2 ) )		{			return result;		}		else if ( ob1 instanceof Comparable				&& ob1 instanceof Comparable )		{			Comparable comp1 = (Comparable) ob1;			Comparable comp2 = (Comparable) ob2;						// Integer can not be compared with Double.				if ( ob1.getClass( ) != ob2.getClass( )					&& ob1 instanceof Number					&& ob1 instanceof Number )			{				try				{					comp1 = (Comparable) DataTypeUtil.toDouble( ob1 );					comp2 = (Comparable) DataTypeUtil.toDouble( ob2 );				}				catch ( BirtException ex )				{					// impossible				}			}								result = comp1.compareTo( comp2 );							}		else if ( ob1 instanceof Boolean				&& ob2 instanceof Boolean )		{			// false is less than true			Boolean bool = (Boolean) ob1;			if ( bool.equals( Boolean.TRUE ) )				result = 1;			else				result = -1;		}		else		{			// Should never get here			//throw new UnsupportedOperationException( );		}		return result;	}