Package org.apache.maven.doxia.module.fo
Class NumberedListItem
java.lang.Object
org.apache.maven.doxia.module.fo.NumberedListItem
Used to count the position in a numbered list.
- Since:
- 1.1
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
The position in the list.private static final String[]
Arabic decimals from 1 - 26.private final int
The numbering format.private static final String[]
Lower-case alphanumerics from a - z.private static final String[]
Lower-case roman numbers from i - xxvi.private static final String[]
Upper-case alphanumerics from A - Z.private static final String[]
Upper-case roman numbers from I - XXVI. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
count()
Returns the current count, ie the position in the list.int
format()
Returns the numbering format.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 Details
-
DECIMALS
Arabic decimals from 1 - 26. -
LOWER_ALPHAS
Lower-case alphanumerics from a - z. -
UPPER_ALPHAS
Upper-case alphanumerics from A - Z. -
LOWER_ROMANS
Lower-case roman numbers from i - xxvi. -
UPPER_ROMANS
Upper-case roman numbers from I - XXVI. -
count
private int countThe position in the list. -
format
private final int formatThe numbering format.
-
-
Constructor Details
-
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 Details
-
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
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.
-