Package com.itextpdf.kernel.numbering
Class RomanNumbering
- java.lang.Object
-
- com.itextpdf.kernel.numbering.RomanNumbering
-
public class RomanNumbering extends java.lang.Object
This class can produce String combinations representing a roman number. The first roman numbers are: I, II, III, IV, V, VI, VII, VIII, IX, X See http://en.wikipedia.org/wiki/Roman_numerals
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
RomanNumbering.RomanDigit
Helper class for Roman Digits
-
Field Summary
Fields Modifier and Type Field Description private static RomanNumbering.RomanDigit[]
ROMAN_DIGITS
Array with Roman digits.
-
Constructor Summary
Constructors Constructor Description RomanNumbering()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static java.lang.String
convert(int index)
Returns a roman representation of an integer.static java.lang.String
toRoman(int number, boolean upperCase)
Returns a roman representation of an integer.static java.lang.String
toRomanLowerCase(int number)
Returns a lower case roman representation of an integer.static java.lang.String
toRomanUpperCase(int number)
Returns an upper case roman representation of an integer.
-
-
-
Field Detail
-
ROMAN_DIGITS
private static final RomanNumbering.RomanDigit[] ROMAN_DIGITS
Array with Roman digits.
-
-
Method Detail
-
toRomanLowerCase
public static java.lang.String toRomanLowerCase(int number)
Returns a lower case roman representation of an integer.- Parameters:
number
- a number to be converted to roman notation- Returns:
- a lower case roman representation of an integer
-
toRomanUpperCase
public static java.lang.String toRomanUpperCase(int number)
Returns an upper case roman representation of an integer.- Parameters:
number
- a number to be converted to roman notation- Returns:
- an upper case roman representation of an integer
-
toRoman
public static java.lang.String toRoman(int number, boolean upperCase)
Returns a roman representation of an integer.- Parameters:
number
- a number to be converted to roman notationupperCase
-true
for upper case representation,false
for lower case one- Returns:
- a roman representation of an integer
-
convert
protected static java.lang.String convert(int index)
Returns a roman representation of an integer.- Parameters:
index
- the original number- Returns:
- the roman number representation (lower case)
-
-