public abstract class Formatter extends Object
Modifier and Type | Class and Description |
---|---|
protected static class |
FormatUtil.Case
Cases.
|
Constructor and Description |
---|
Formatter() |
Modifier and Type | Method and Description |
---|---|
protected abstract byte[] |
ampm(boolean am)
Returns the am/pm marker.
|
protected abstract byte[] |
calendar()
Returns the calendar.
|
protected abstract byte[] |
day(int n,
int min,
int max)
Returns the specified day of the week (0-6, Sunday-Saturday).
|
protected abstract byte[] |
era(long year)
Returns the era.
|
byte[] |
formatDate(ADate date,
byte[] lng,
byte[] pic,
byte[] cal,
byte[] plc,
InputInfo ii)
Formats the specified date.
|
byte[] |
formatInt(long num,
FormatParser fp)
Returns a formatted integer.
|
static Formatter |
get(byte[] ln)
Returns a formatter for the specified language.
|
protected abstract byte[] |
month(int n,
int min,
int max)
Returns the specified month (0-11).
|
protected abstract byte[] |
ordinal(long n,
byte[] ord)
Returns an ordinal representation for the specified number.
|
protected abstract byte[] |
word(long n,
byte[] ord)
Returns a word representation for the specified number.
|
public static Formatter get(byte[] ln)
ln
- languageprotected abstract byte[] word(long n, byte[] ord)
n
- number to be formattedord
- ordinal suffixprotected abstract byte[] ordinal(long n, byte[] ord)
n
- number to be formattedord
- ordinal suffixprotected abstract byte[] month(int n, int min, int max)
n
- number to be formattedmin
- minimum lengthmax
- maximum lengthprotected abstract byte[] day(int n, int min, int max)
n
- number to be formattedmin
- minimum lengthmax
- maximum lengthprotected abstract byte[] ampm(boolean am)
am
- am flagprotected abstract byte[] calendar()
protected abstract byte[] era(long year)
year
- yearpublic final byte[] formatDate(ADate date, byte[] lng, byte[] pic, byte[] cal, byte[] plc, InputInfo ii) throws QueryException
date
- date to be formattedlng
- languagepic
- picturecal
- calendarplc
- placeii
- input infoQueryException
- query exceptionpublic final byte[] formatInt(long num, FormatParser fp)
num
- integer to be formattedfp
- format parserCopyright © 2005–2015 BaseX Team. All rights reserved.