Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

oracle.jbo.format
Class DefaultPercentageFormatter

java.lang.Object
  extended by oracle.adfnmc.util.Formatter
      extended by oracle.jbo.format.Formatter
          extended by oracle.jbo.format.DefaultPercentageFormatter

public class DefaultPercentageFormatter
extends Formatter

Helper class used to format percentage values

Version:
SDK

Field Summary
 
Fields inherited from class oracle.jbo.format.Formatter
CLASS_INSTANCE
 
Fields inherited from class oracle.adfnmc.util.Formatter
INVALID_NUMBER
 
Constructor Summary
DefaultPercentageFormatter()
          Constructor
 
Method Summary
 java.lang.String format(java.lang.String formatString, java.lang.Object rawData)
          format raw data according to the format specified.
 LocaleContext getLocale()
           
 java.lang.Object parse(java.lang.String formatString, java.lang.String parseThisString)
          parse this string according to the format specified and return an object
 void setLocale(LocaleContext thisLocale)
          define locale to be used.
 
Methods inherited from class oracle.jbo.format.Formatter
getDefaultFormatString
 
Methods inherited from class oracle.adfnmc.util.Formatter
formatCurrency, formatCurrency, formatCurrency, formatCurrency, formatCurrency, formatCurrency, formatDate, formatDate, formatDate, formatDate, formatNumber, formatNumber, formatNumber, formatNumber, formatNumber, formatNumber, formatNumber, formatNumber, formatNumber, formatPercent, formatPercent, formatPercent, formatPercent, formatPercent, formatPercent, formatTime, formatTime, getDateFormat, getDateFormat, getDateTimeFormat, getTimeFormat, isPercent, makeNumChars, removeCurrencySymbols, removeDecimalSymbol, removeNumberSymbols, removePatternSymbols, removePercentSymbols
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultPercentageFormatter

public DefaultPercentageFormatter()
Constructor

Method Detail

format

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

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

Specified by:
format in class Formatter
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 java.lang.Object parse(java.lang.String formatString,
                              java.lang.String parseThisString)
parse this string according to the format specified and return an object

Specified by:
parse in class Formatter
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 void setLocale(LocaleContext thisLocale)
define locale to be used. Formatter will need to make locale specific formatting if applicable

Specified by:
setLocale in class Formatter
Parameters:
thisLocale - locale to be used
Throws:
UnknownLocaleException - if the formatter does'nt support the specified Locale.

getLocale

public LocaleContext getLocale()
Returns:
Locale currently in use

Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

Copyright © 2011, Oracle and/or its affiliates. All rights reserved.