gnu.text
Class ReportFormat
java.lang.Object
java.text.Format
gnu.text.ReportFormat
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable
- Direct Known Subclasses:
- CaseConvertFormat, CompoundFormat, FlushFormat, IntegerFormat, LiteralFormat, ObjectFormat, PadFormat
public abstract class ReportFormat
- extends java.text.Format
- See Also:
- Serialized Form
Nested classes/interfaces inherited from class java.text.Format |
java.text.Format.Field |
Field Summary |
static int |
PARAM_FROM_COUNT
Some Formats use this to indicate a parameter that is the
number of remaining paramaters. |
static int |
PARAM_FROM_LIST
Some Formats use this to indicate a parameter that is the
extracted from the argment list. |
static int |
PARAM_UNSPECIFIED
Some Formats use this to indicate an unspecified parameter. |
Method Summary |
static int |
format(java.text.Format fmt,
java.lang.Object[] args,
int start,
java.lang.StringBuffer sbuf,
java.text.FieldPosition fpos)
|
static int |
format(java.text.Format fmt,
java.lang.Object[] args,
int start,
java.io.Writer dst,
java.text.FieldPosition fpos)
|
int |
format(java.lang.Object[] args,
int start,
java.lang.StringBuffer sbuf,
java.text.FieldPosition fpos)
|
abstract int |
format(java.lang.Object[] args,
int start,
java.io.Writer dst,
java.text.FieldPosition fpos)
Format an array of arguments, and write out the result. |
int |
format(java.lang.Object arg,
int start,
java.io.Writer dst,
java.text.FieldPosition fpos)
|
java.lang.StringBuffer |
format(java.lang.Object obj,
java.lang.StringBuffer sbuf,
java.text.FieldPosition fpos)
|
protected static char |
getParam(int param,
char defaultValue,
java.lang.Object[] args,
int start)
|
protected static int |
getParam(int param,
int defaultValue,
java.lang.Object[] args,
int start)
|
static int |
getParam(java.lang.Object arg,
int defaultValue)
|
static int |
nextArg(int result)
|
java.lang.Object |
parseObject(java.lang.String text,
java.text.ParsePosition status)
|
static void |
print(java.io.Writer dst,
java.lang.String str)
|
static int |
result(int resultCode,
int nextArg)
|
static int |
resultCode(int result)
|
Methods inherited from class java.text.Format |
clone, format, formatToCharacterIterator, parseObject |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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.
- See Also:
- Constant Field Values
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.
- See Also:
- Constant Field Values
PARAM_UNSPECIFIED
public static final int PARAM_UNSPECIFIED
- Some Formats use this to indicate an unspecified parameter.
- See Also:
- Constant Field Values
ReportFormat
public ReportFormat()
result
public static int result(int resultCode,
int nextArg)
nextArg
public static int nextArg(int result)
resultCode
public static int resultCode(int result)
format
public abstract int format(java.lang.Object[] args,
int start,
java.io.Writer dst,
java.text.FieldPosition fpos)
throws java.io.IOException
- Format an array of arguments, and write out the result.
- Parameters:
dst
- where to write the resultargs
- the objects to be formattedstart
- 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)
- Throws:
java.io.IOException
format
public int format(java.lang.Object arg,
int start,
java.io.Writer dst,
java.text.FieldPosition fpos)
throws java.io.IOException
- Throws:
java.io.IOException
format
public java.lang.StringBuffer format(java.lang.Object obj,
java.lang.StringBuffer sbuf,
java.text.FieldPosition fpos)
- Specified by:
format
in class java.text.Format
format
public int format(java.lang.Object[] args,
int start,
java.lang.StringBuffer sbuf,
java.text.FieldPosition fpos)
format
public static int format(java.text.Format fmt,
java.lang.Object[] args,
int start,
java.io.Writer dst,
java.text.FieldPosition fpos)
throws java.io.IOException
- Throws:
java.io.IOException
format
public static int format(java.text.Format fmt,
java.lang.Object[] args,
int start,
java.lang.StringBuffer sbuf,
java.text.FieldPosition fpos)
print
public static void print(java.io.Writer dst,
java.lang.String str)
throws java.io.IOException
- Throws:
java.io.IOException
parseObject
public java.lang.Object parseObject(java.lang.String text,
java.text.ParsePosition status)
- Specified by:
parseObject
in class java.text.Format
getParam
public static int getParam(java.lang.Object arg,
int defaultValue)
getParam
protected static int getParam(int param,
int defaultValue,
java.lang.Object[] args,
int start)
getParam
protected static char getParam(int param,
char defaultValue,
java.lang.Object[] args,
int start)