public class RomanNumeral extends Number implements Comparable<RomanNumeral>
RomanNumeral num = new RomanNumeral(1944);
num.toString() will be equal to "MCMXLIV".
| Constructor and Description |
|---|
RomanNumeral(int inValue)
Create a RomanNumeral object from an integer value.
|
RomanNumeral(String inValue)
Create a RomanNumeral object from a Roman numeral string such as "MCMXLIV".
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(RomanNumeral inObj)
Numerically compares two RomanNumeral objects.
|
double |
doubleValue() |
float |
floatValue() |
int |
getIntValue()
Deprecated.
use intValue()
|
int |
intValue() |
long |
longValue() |
String |
toString()
Returns the Roman numeral string value of the Roman numeral.
|
byteValue, shortValuepublic RomanNumeral(int inValue)
public RomanNumeral(String inValue)
public int getIntValue()
public float floatValue()
floatValue in class Numberpublic double doubleValue()
doubleValue in class Numberpublic int compareTo(RomanNumeral inObj)
compareTo in interface Comparable<RomanNumeral>
jataylor@hairyfatguy.com