private static Object toExternalNumber ( BigDecimal number ) { return Optional . ofNullable ( toObject ( number , ObjectUtils :: toInt , ObjectUtils :: toLong ) ) . orElse ( number ) ; }
Returns an object equal to the external form of the given number value .