gnu.text

Class CompoundFormat

Known Direct Subclasses:
LispFormat

public class CompoundFormat
extends ReportFormat

Field Summary

protected Format[]
formats
protected int
length

Fields inherited from class gnu.text.ReportFormat

PARAM_FROM_COUNT, PARAM_FROM_LIST, PARAM_UNSPECIFIED

Constructor Summary

CompoundFormat(Format[] formats)
CompoundFormat(Format[] formats, int length)

Method Summary

int
format(Object[] args, int start, StringBuffer sbuf, FieldPosition fpos)
int
format(Object[] args, int start, Writer dst, FieldPosition fpos)
Format an array of arguments, and write out the result.
Object
parseObject(String text, java.text.ParsePosition status)
String
toString()

Methods inherited from class gnu.text.ReportFormat

format, format, format, format, format, format, getParam, getParam, getParam, nextArg, parseObject, print, print, result, resultCode

Field Details

formats

protected Format[] formats

length

protected int length

Constructor Details

CompoundFormat

public CompoundFormat(Format[] formats)

CompoundFormat

public CompoundFormat(Format[] formats,
                      int length)

Method Details

format

public final int format(Object[] args,
                        int start,
                        StringBuffer sbuf,
                        FieldPosition fpos)
Overrides:
format in interface ReportFormat

format

public int format(Object[] args,
                  int start,
                  Writer dst,
                  FieldPosition fpos)
            throws java.io.IOException
Format an array of arguments, and write out the result.
Overrides:
format in interface ReportFormat
Parameters:
args - the objects to be formatted
start - the index (in args) of the argument to start with
dst - where to write the result
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)

parseObject

public Object parseObject(String text,
                          java.text.ParsePosition status)
Overrides:
parseObject in interface ReportFormat

toString

public String toString()