Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.6.0)

E10653-07

oracle.jbo.format
Class Formatter

java.lang.Object
  extended by java.text.Format
      extended by oracle.jbo.format.Formatter
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
DefaultCurrencyFormatter, DefaultDateFormatter, DefaultMessageFormatter, DefaultNumberFormatter, DefaultPercentageFormatter

public abstract class Formatter
extends java.text.Format

Formatter

Formatter interface defines functions for formatting support

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.text.Format
java.text.Format.Field
 
Constructor Summary
Formatter()
           
 
Method Summary
abstract  java.lang.String format(java.lang.String formatString, java.lang.Object rawData)
          format raw data according to the format specified.
 java.lang.String getDefaultFormatString()
           
abstract  LocaleContext getLocale()
           
abstract  java.lang.Object parse(java.lang.String formatString, java.lang.String parseThisString)
          parse this string according to the format specified and return an object
abstract  void setLocale(LocaleContext thisLocale)
          define locale to be used.
 
Methods inherited from class java.text.Format
clone, format, format, formatToCharacterIterator, parseObject, parseObject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Formatter

public Formatter()
Method Detail

format

public abstract java.lang.String format(java.lang.String formatString,
                                        java.lang.Object rawData)
                                 throws FormatErrorException
format raw data according to the format specified.

Data is formatted per the 'format string' passed as an argument to this function.

Parameters:
formatString - code to define how the raw data should be formatted.
rawData - data which needs to be formatted.
Returns:
formatted string
Throws:
FormatErrorException - if unable to format the data according to the format specified.

parse

public abstract java.lang.Object parse(java.lang.String formatString,
                                       java.lang.String parseThisString)
                                throws java.text.ParseException
parse this string according to the format specified and return an object

Parameters:
formatString - code to define how the raw data should be parsed.
parseThisString - data which needs to be parsed.
Returns:
object which represents the string parsed.
Throws:
java.text.ParseException - when unable to parse data according to the format specified.

setLocale

public abstract void setLocale(LocaleContext thisLocale)
                        throws UnknownLocaleException
define locale to be used. Formatter will need to make locale specific formatting if applicable

Parameters:
thisLocale - locale to be used
Throws:
UnknownLocaleException - if the formatter does'nt support the specified Locale.

getLocale

public abstract LocaleContext getLocale()
Returns:
LocaleContext currently in use

getDefaultFormatString

public java.lang.String getDefaultFormatString()
Returns:
the default format string to use for format/parse requests processed by this formatter type.

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.6.0)

E10653-07

Copyright © 1997, 2011, Oracle. All rights reserved.