class AnalyticsUtils {

    public static Object getRoundedValueObject( DataQueryParams params, Object value )
    {
        if ( value == null || !Double.class.equals( value.getClass() ) )
        {
            return value;
        }
        else if ( params.isSkipRounding() )
        {
            return Precision.round( (Double) value, DECIMALS_NO_ROUNDING );
        }

        return MathUtils.getRounded( (Double) value );
    }

}