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