org.maverickdbms.basic.text
Class DIconvFormatter

java.lang.Object
  extended byorg.maverickdbms.basic.text.Formatter
      extended byorg.maverickdbms.basic.text.DFormatter
          extended byorg.maverickdbms.basic.text.DIconvFormatter
All Implemented Interfaces:
Formatter

public class DIconvFormatter
extends org.maverickdbms.basic.text.DFormatter

This is the basic string interface for the package.


Field Summary
protected  boolean convNull
           
protected  int count
           
protected static java.lang.String[] DAY_OF_WEEK
           
protected  char delim
           
protected  Factory factory
           
protected  char[] fmts
           
protected  int[] lengths
           
protected  java.lang.String[] modifiers
           
protected static java.lang.String[] MONTH_OF_YEAR
           
protected  java.lang.Object[] patterns
           
protected  java.lang.String[] suffixes
           
protected  int type
           
protected  int yearlen
           
 
Fields inherited from interface org.maverickdbms.basic.Formatter
STATUS_INVALID_CONVERSION, STATUS_INVALID_DATE, STATUS_INVALID_EXPRESSION, STATUS_SUCCESS, TYPE_FMT, TYPE_ICONV, TYPE_OCONV, TYPE_PRINT
 
Constructor Summary
DIconvFormatter(Factory factory, int type, java.lang.Object[] patterns, boolean convNull)
           
 
Method Summary
 mvString format(mvString result, mvString status, ConstantString input)
          Format the specified input string
 ConstantString getPattern()
          Return the formatter conversion pattern
 int getType()
          Return the type of the formatter
 boolean isNullOnError()
          On error whether null or the input string is returned
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DAY_OF_WEEK

protected static final java.lang.String[] DAY_OF_WEEK

MONTH_OF_YEAR

protected static final java.lang.String[] MONTH_OF_YEAR

yearlen

protected int yearlen

delim

protected char delim

fmts

protected char[] fmts

modifiers

protected java.lang.String[] modifiers

lengths

protected int[] lengths

suffixes

protected java.lang.String[] suffixes

count

protected int count

factory

protected Factory factory

type

protected int type

patterns

protected java.lang.Object[] patterns

convNull

protected boolean convNull
Constructor Detail

DIconvFormatter

public DIconvFormatter(Factory factory,
                       int type,
                       java.lang.Object[] patterns,
                       boolean convNull)
Method Detail

format

public mvString format(mvString result,
                       mvString status,
                       ConstantString input)
Description copied from interface: Formatter
Format the specified input string

Parameters:
result - string to store the result
status - errorcode if the foramt failed
input - string to format
Returns:
the resulting string

isNullOnError

public boolean isNullOnError()
Description copied from interface: Formatter
On error whether null or the input string is returned

Specified by:
isNullOnError in interface Formatter
Returns:
if null is returned

getPattern

public ConstantString getPattern()
Description copied from interface: Formatter
Return the formatter conversion pattern

Specified by:
getPattern in interface Formatter
Returns:
the formatters pattern

getType

public int getType()
Description copied from interface: Formatter
Return the type of the formatter

Specified by:
getType in interface Formatter
Returns:
the formatters type