Example #1
0
 /**
  * Get the best matching formatting of the passed value.
  *
  * @param aSize The value to be converted to a size value. May not be <code>null</code>.
  * @param nDecimals The number of fraction digits.
  * @return The string representation
  * @throws IllegalArgumentException If the passed value cannot be fit in a long
  */
 @Nonnull
 public String getAsMatching(@Nonnull final BigDecimal aSize, @Nonnegative final int nDecimals) {
   _checkConvertibility(aSize);
   return getAsMatching(aSize.longValue(), nDecimals);
 }
Example #2
0
 /**
  * Get the best matching formatting of the passed value. No fraction digits will be emitted.
  *
  * @param aSize The value to be converted to a size value. May not be <code>null</code>.
  * @return The string representation
  * @throws IllegalArgumentException If the passed value cannot be fit in a long
  */
 @Nonnull
 public String getAsMatching(@Nonnull final BigDecimal aSize) {
   _checkConvertibility(aSize);
   return getAsMatching(aSize.longValue());
 }