org.maverickdbms.basic
Interface Formatter

All Known Implementing Classes:
org.maverickdbms.basic.text.Formatter

public interface Formatter

Formatter provides an interface for using various formatting classes


Field Summary
static int STATUS_INVALID_CONVERSION
           
static int STATUS_INVALID_DATE
           
static int STATUS_INVALID_EXPRESSION
           
static int STATUS_SUCCESS
           
static int TYPE_FMT
           
static int TYPE_ICONV
           
static int TYPE_OCONV
           
static int TYPE_PRINT
           
 
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
 

Field Detail

TYPE_FMT

public static final int TYPE_FMT
See Also:
Constant Field Values

TYPE_ICONV

public static final int TYPE_ICONV
See Also:
Constant Field Values

TYPE_OCONV

public static final int TYPE_OCONV
See Also:
Constant Field Values

TYPE_PRINT

public static final int TYPE_PRINT
See Also:
Constant Field Values

STATUS_SUCCESS

public static final int STATUS_SUCCESS
See Also:
Constant Field Values

STATUS_INVALID_EXPRESSION

public static final int STATUS_INVALID_EXPRESSION
See Also:
Constant Field Values

STATUS_INVALID_CONVERSION

public static final int STATUS_INVALID_CONVERSION
See Also:
Constant Field Values

STATUS_INVALID_DATE

public static final int STATUS_INVALID_DATE
See Also:
Constant Field Values
Method Detail

format

public mvString format(mvString result,
                       mvString status,
                       ConstantString input)
                throws mvException
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
Throws:
mvException

isNullOnError

public boolean isNullOnError()
On error whether null or the input string is returned

Returns:
if null is returned

getType

public int getType()
Return the type of the formatter

Returns:
the formatters type

getPattern

public ConstantString getPattern()
Return the formatter conversion pattern

Returns:
the formatters pattern