public class RomanNumeralSymbol extends Object implements Comparable<RomanNumeralSymbol>
Modifier and Type | Field and Description |
---|---|
static RomanNumeralSymbol |
C
The Roman numeral for the integer 100.
|
static RomanNumeralSymbol |
D
The Roman numeral for the integer 500.
|
static RomanNumeralSymbol |
I
The Roman numeral for the integer 1.
|
static RomanNumeralSymbol |
L
The Roman numeral for the integer 50.
|
static RomanNumeralSymbol |
M
The Roman numeral for the integer 1000.
|
static RomanNumeralSymbol |
V
The Roman numeral for the integer 5.
|
static RomanNumeralSymbol |
X
The Roman numeral for the integer 10.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canPrecede(RomanNumeralSymbol inSymbol)
Returns whether this symbol can legally precede the specified symbol given
the subtractive principle.
|
int |
compareTo(RomanNumeralSymbol inObj)
Numerically compares two RomanNumeralSymbol objects.
|
int |
getIntValue()
Returns the integer value of the Roman numeral symbol.
|
char |
getLetter()
Returns the character value of the Roman numeral symbol.
|
String |
toString()
Returns the Roman numeral string value of the Roman numeral symbol.
|
static RomanNumeralSymbol |
valueOf(char inLetter)
Returns the RomanNumeralSymbol value for the specified character.
|
static RomanNumeralSymbol[] |
values()
Returns an array of all the RomanNumeralSymbol values.
|
public static RomanNumeralSymbol I
public static RomanNumeralSymbol V
public static RomanNumeralSymbol X
public static RomanNumeralSymbol L
public static RomanNumeralSymbol C
public static RomanNumeralSymbol D
public static RomanNumeralSymbol M
public static RomanNumeralSymbol valueOf(char inLetter)
public static RomanNumeralSymbol[] values()
public char getLetter()
public int getIntValue()
public String toString()
public int compareTo(RomanNumeralSymbol inObj)
compareTo
in interface Comparable<RomanNumeralSymbol>
public boolean canPrecede(RomanNumeralSymbol inSymbol)