gnu.text
Class ReportFormat

java.lang.Object
  extended by java.text.Format
      extended by 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 Class Summary
 
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.
 
Constructor Summary
ReportFormat()
           
 
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.lang.Object value, Consumer out)
           
static void print(java.io.Writer dst, java.lang.String str)
          (Parameters in non-standard order.)
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
 

Field Detail

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
Constructor Detail

ReportFormat

public ReportFormat()
Method Detail

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 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)
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
(Parameters in non-standard order.)

Throws:
java.io.IOException

print

public static void print(java.lang.Object value,
                         Consumer out)

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)