/** * Tries to convert the wrapped value to a roman numeral representation. * Any fractional part of this {@code BigDecimal} will be discarded, * and if the resulting "{@code BigInteger}" is too big to fit in an {@code int}, only the low-order 32 bits are * returned. * * @return a string representation of this number as roman numeral or "" for values <= 0 and >= 4000. */ public String toRomanNumeralString() { return RomanNumeral.toRoman(value.intValue()); }
/** * Tries to convert the wrapped value to a roman numeral representation * This only works if the wrapped value can be converted to <tt>int</tt> and is >0 and <4000. * * @param defaultValue the value to be converted to roman numeral if the wrapped value can not be converted * @return a roman numeral representation of either the wrapped value or the defaultValue. values >=4000 and * <=0 are represented as an empty String */ public String asRomanNumeral(int defaultValue) { return RomanNumeral.toRoman(asInt(defaultValue)); }