![JAR search and dependency download from the Maven repository](/logo.png)
js.template.xhtml.NumberingFormat Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of js-xhtml-template Show documentation
Show all versions of js-xhtml-template Show documentation
Reference implementation for j(s)-lib template API, declarative, natural and based on X(HT)ML language.
The newest version!
package js.template.xhtml;
/**
* Formatter used by ordered lists and maps for numbering. Simple put, a numbering formatter gets an index and transform it into
* a related string. These are stock implementations:
*
*
* name
* code
* sample
*
* {@link ArabicNumeralNumbering arabic numeral}
* n
* 1, 2, 3, 4 ... 10, 11 ... 27, 28
*
* {@link LowerCaseRomanNumbering lower roman}
* i
* i, ii, iii, iv ... x, xi ... xxvii, xxviii
*
* {@link UpperCaseRomanNumbering upper roman}
* I
* I, II, III, IV ... X, XI ... XXVII, XXVIII
*
* {@link LowerCaseStringNumbering lower string}
* s
* a, b, c, d ... k, l ... aa, bb
*
* {@link UpperCaseStringNumbering upper string}
* S
* A, B, C, D ... K, L ... AA, BB
*
* Please note that, in order to keep things simple, there is no support for user defined numbering formatters.
*
* @author Iulian Rotaru
*/
abstract class NumberingFormat
{
/**
* Generate string representation for given ordinal index.
*
* @param index ordinal index.
* @return index string representation.
*/
abstract String format(int index);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy