Package org.apache.maven.doxia.module.fo
Class NumberedListItem
- java.lang.Object
-
- org.apache.maven.doxia.module.fo.NumberedListItem
-
public class NumberedListItem extends java.lang.Object
Used to count the position in a numbered list.- Since:
- 1.1
-
-
Field Summary
Fields Modifier and Type Field Description private int
count
The position in the list.private static java.lang.String[]
DECIMALS
Arabic decimals from 1 - 26.private int
format
The numbering format.private static java.lang.String[]
LOWER_ALPHAS
Lower-case alphanumerics from a - z.private static java.lang.String[]
LOWER_ROMANS
Lower-case roman numbers from i - xxvi.private static java.lang.String[]
UPPER_ALPHAS
Upper-case alphanumerics from A - Z.private static java.lang.String[]
UPPER_ROMANS
Upper-case roman numbers from I - XXVI.
-
Constructor Summary
Constructors Constructor Description NumberedListItem(int itemFormat)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
count()
Returns the current count, ie the position in the list.int
format()
Returns the numbering format.java.lang.String
getListItemSymbol()
Returns the symbol for the current list item.private boolean
isValidItemFormat(int itemFormat)
Determines if the given format is one of the formats defined inSink
.void
next()
Increase the current count by 1.
-
-
-
Field Detail
-
DECIMALS
private static final java.lang.String[] DECIMALS
Arabic decimals from 1 - 26.
-
LOWER_ALPHAS
private static final java.lang.String[] LOWER_ALPHAS
Lower-case alphanumerics from a - z.
-
UPPER_ALPHAS
private static final java.lang.String[] UPPER_ALPHAS
Upper-case alphanumerics from A - Z.
-
LOWER_ROMANS
private static final java.lang.String[] LOWER_ROMANS
Lower-case roman numbers from i - xxvi.
-
UPPER_ROMANS
private static final java.lang.String[] UPPER_ROMANS
Upper-case roman numbers from I - XXVI.
-
count
private int count
The position in the list.
-
format
private final int format
The numbering format.
-
-
Constructor Detail
-
NumberedListItem
public NumberedListItem(int itemFormat)
Constructor. Initializes count and format.- Parameters:
itemFormat
- The numbering format of this List. Should be one of the formats defined inSink
.
-
-
Method Detail
-
count
public int count()
Returns the current count, ie the position in the list.- Returns:
- The current count.
-
format
public int format()
Returns the numbering format.- Returns:
- The numbering format.
-
next
public void next()
Increase the current count by 1.
-
getListItemSymbol
public java.lang.String getListItemSymbol()
Returns the symbol for the current list item.- Returns:
- The symbol for the current list item.
-
isValidItemFormat
private boolean isValidItemFormat(int itemFormat)
Determines if the given format is one of the formats defined inSink
.- Parameters:
itemFormat
- the format to check.- Returns:
- True if the format is a valid item format according to the Sink API.
-
-