public class RomanNumbers extends Object
Modifier and Type | Field and Description |
---|---|
static String[] |
hundreds |
protected static Map<Character,Integer> |
romanLetterValues |
static String[] |
tens |
static String[] |
thousands |
static String[] |
units |
Constructor and Description |
---|
RomanNumbers() |
Modifier and Type | Method and Description |
---|---|
protected static void |
error(MessageReceiver<SimpleMessage<?>> msg,
String s) |
protected static void |
error(MessageReceiver<SimpleMessage<?>> msg,
String s,
Object... os) |
static Function<String,Integer> |
f_roman2integer(MessageReceiver<SimpleMessage<?>> msg,
boolean lowercasesupported,
boolean uppercasesupported,
boolean subtractiveformat_directNeighbour,
boolean subtractiveformat_fartherNeighbour)
Deprecated.
FIXME check if used in tscore??
|
static @Opt String |
int2roman(int num,
boolean uppercase)
Public and Central Service Access Point.
|
static void |
main(String[] args) |
static @Opt Integer |
roman2integer(MessageReceiver<SimpleMessage<?>> msg,
String s,
boolean lowercasesupported,
boolean uppercasesupported,
boolean subtractiveformat_directNeighbour,
boolean subtractiveformat_fartherNeighbour)
Public and Central Service Access Point to convert a string.
|
public static final String[] thousands
public static final String[] hundreds
public static final String[] tens
public static final String[] units
protected static void error(MessageReceiver<SimpleMessage<?>> msg, String s)
protected static void error(MessageReceiver<SimpleMessage<?>> msg, String s, Object... os)
public static final Function<String,Integer> f_roman2integer(MessageReceiver<SimpleMessage<?>> msg, boolean lowercasesupported, boolean uppercasesupported, boolean subtractiveformat_directNeighbour, boolean subtractiveformat_fartherNeighbour)
@Opt public static final @Opt Integer roman2integer(MessageReceiver<SimpleMessage<?>> msg, String s, boolean lowercasesupported, boolean uppercasesupported, boolean subtractiveformat_directNeighbour, boolean subtractiveformat_fartherNeighbour)
msg
- Message Receiver for error messagess
- the string to convertlowercasesupported
- whether the input may be in lower case onlyuppercasesupported
- whether the input may be in upper case onlysubtractiveformat_directNeighbour
- Whether the immediately smaller digit
left of a digit means subtractionsubtractiveformat_fartherNeighbour
- Whether ANY smaller digit
left of a digit means subtraction@Opt public static @Opt String int2roman(int num, boolean uppercase)
num
- the number to convert.uppercase
- whether to return in uppercase, not lowercase.public static void main(String[] args)
see also the complete user documentation .