gnu.text

Class ReportFormat

public abstract class ReportFormat extends Format

Field Summary
static intPARAM_FROM_COUNT
Some Formats use this to indicate a parameter that is the number of remaining paramaters.
static intPARAM_FROM_LIST
Some Formats use this to indicate a parameter that is the extracted from the argment list.
static intPARAM_UNSPECIFIED
Some Formats use this to indicate an unspecified parameter.
Method Summary
abstract intformat(Object[] args, int start, Writer dst, FieldPosition fpos)
Format an array of arguments, and write out the result.
intformat(Object arg, int start, Writer dst, FieldPosition fpos)
StringBufferformat(Object obj, StringBuffer sbuf, FieldPosition fpos)
intformat(Object[] args, int start, StringBuffer sbuf, FieldPosition fpos)
static intformat(Format fmt, Object[] args, int start, Writer dst, FieldPosition fpos)
static intformat(Format fmt, Object[] args, int start, StringBuffer sbuf, FieldPosition fpos)
static intgetParam(Object arg, int defaultValue)
protected static intgetParam(int param, int defaultValue, Object[] args, int start)
protected static chargetParam(int param, char defaultValue, Object[] args, int start)
static intnextArg(int result)
ObjectparseObject(String text, ParsePosition status)
static voidprint(Writer dst, String str)
(Parameters in non-standard order.)
static voidprint(Object value, Consumer out)
static intresult(int resultCode, int nextArg)
static intresultCode(int result)

Field Detail

PARAM_FROM_COUNT

public static final int PARAM_FROM_COUNT
Some Formats use this to indicate a parameter that is the number of remaining paramaters.

PARAM_FROM_LIST

public static final int PARAM_FROM_LIST
Some Formats use this to indicate a parameter that is the extracted from the argment list.

PARAM_UNSPECIFIED

public static final int PARAM_UNSPECIFIED
Some Formats use this to indicate an unspecified parameter.

Method Detail

format

public abstract int format(Object[] args, int start, Writer dst, FieldPosition fpos)
Format an array of arguments, and write out the result.

Parameters: dst where to write the result args the objects to be formatted start the index (in args) of the argument to start with

Returns: an integer result(resultCode, nextArg), where nextArg is the index following the last argument processed, and code is a result code (normally 0, or negative if early termintation)

format

public int format(Object arg, int start, Writer dst, FieldPosition fpos)

format

public StringBuffer format(Object obj, StringBuffer sbuf, FieldPosition fpos)

format

public int format(Object[] args, int start, StringBuffer sbuf, FieldPosition fpos)

format

public static int format(Format fmt, Object[] args, int start, Writer dst, FieldPosition fpos)

format

public static int format(Format fmt, Object[] args, int start, StringBuffer sbuf, FieldPosition fpos)

getParam

public static int getParam(Object arg, int defaultValue)

getParam

protected static int getParam(int param, int defaultValue, Object[] args, int start)

getParam

protected static char getParam(int param, char defaultValue, Object[] args, int start)

nextArg

public static int nextArg(int result)

parseObject

public Object parseObject(String text, ParsePosition status)

print

public static void print(Writer dst, String str)
(Parameters in non-standard order.)

print

public static void print(Object value, Consumer out)

result

public static int result(int resultCode, int nextArg)

resultCode

public static int resultCode(int result)