public abstract class Formatter
extends java.lang.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(int year)
Returns the era.
|
byte[] |
formatDate(Date date,
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(java.lang.String 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(java.lang.String 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(int year)
year - yearpublic final byte[] formatDate(Date date, byte[] pic, byte[] cal, byte[] plc, InputInfo ii) throws QueryException
date - date to be formattedpic - picturecal - calendarplc - placeii - input infoQueryException - query exceptionpublic final byte[] formatInt(long num,
FormatParser fp)
num - integer to be formattedfp - format parser