Java Doc for NeutralFormatterImpl.java in  » 6.0-JDK-Modules » j2me » com » sun » j2me » global » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » j2me » com.sun.j2me.global 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.j2me.global.NeutralFormatterImpl

NeutralFormatterImpl
public class NeutralFormatterImpl implements CommonFormatter(Code)
This class actually realizes most of the methods of javax.microedition.global.Formatter . Specifically, these are:

This realization of Formatter is for locale-neutral formatting only. Therefore, it is common for all implementations and platforms.




Constructor Summary
 NeutralFormatterImpl()
     Default constructor of locale-neutral Formatter realization class.

Method Summary
public  StringformatCurrency(double number)
     Formats a currency amount using locale-specific rules.
public  StringformatCurrency(double number, String currencyCode)
     Formats a currency amount using the locale-specific rules but using the symbol of the specified currency.
public  StringformatDateTime(Calendar dateTime, int style)
     Formats a date/time instance using ISO 8601 (RFC 3339) rules. The style parameter determines the extent and style of the result.
public  StringformatNumber(double number)
     Formats a decimal number using locale-specific rules.
public  StringformatNumber(double number, int decimals)
     Formats a decimal number using locale-specific rules, with the specified number of decimals.
public  StringformatNumber(long number)
     Formats an integer using locale-specific rules.
public  StringformatPercentage(long number)
     Formats an integral percentage value using locale-specific rules.
public  StringformatPercentage(float number, int decimals)
     Formats a percentage with the specified number of decimals using locale-specific rules.


Constructor Detail
NeutralFormatterImpl
NeutralFormatterImpl()(Code)
Default constructor of locale-neutral Formatter realization class.




Method Detail
formatCurrency
public String formatCurrency(double number)(Code)
Formats a currency amount using locale-specific rules. This method assumes that the amount is in the locale's currency. The result uses the locale-specific decimal separator and may include grouping separators. The number of decimals is also locale-specific.

This method does not perform any currency conversions based on exchange rates.
Parameters:
  number - the currency amount to format the formatted currency amount




formatCurrency
public String formatCurrency(double number, String currencyCode)(Code)
Formats a currency amount using the locale-specific rules but using the symbol of the specified currency. The currency is specified using its ISO 4217 three-letter code, such as "USD", "EUR" or "GBP". If there is a currency symbol attached to the ISO 4217 code in the implementation, that symbol MUST be used instead of the locale's currency symbol. If the implementation does not provide a currency symbol for a given ISO 4217 code, the code MUST be used as such.

The result uses the locale-specific decimal separator and may include grouping separators. The number of decimals is also locale-specific.

This method does not perform any currency conversions based on exchange rates.
Parameters:
  number - the currency amount to format
Parameters:
  currencyCode - the ISO 4217 currency code to use formatted currency amount




formatDateTime
public String formatDateTime(Calendar dateTime, int style)(Code)
Formats a date/time instance using ISO 8601 (RFC 3339) rules. The style parameter determines the extent and style of the result.

If dateTime has an associated java.util.TimeZone object, dateTime MUST be interpreted as "wall time", not universal time. The offset of that time zone MUST be reflected in the formatted time.
Parameters:
  dateTime - the date and time to format
Parameters:
  style - the formatting style to use the date and/or time formatted as a string




formatNumber
public String formatNumber(double number)(Code)
Formats a decimal number using locale-specific rules. The result includes a locale-specific decimal separator and may include grouping separators.

The symbols used for negative and positive infinity and NaN are implementation-specific. Implementations MAY use the appropriate Unicode character (U+221F INFINITY) if applicable.
Parameters:
  number - the number to format formatted decimal number




formatNumber
public String formatNumber(double number, int decimals)(Code)
Formats a decimal number using locale-specific rules, with the specified number of decimals. The result includes a locale-specific decimal separator and may include grouping separators.

The number of decimals MUST be between 1 and 15. The formatted result MUST have exactly the specified number of decimals, even if some of the trailing digits are zeroes.

The symbols used for negative and positive infinity and NaN are implementation-specific. Implementations MAY use the appropriate Unicode character (U+221F INFINITY) if applicable.
Parameters:
  number - the number to format
Parameters:
  decimals - number of decimals formatted decimal number




formatNumber
public String formatNumber(long number)(Code)
Formats an integer using locale-specific rules. The result may include grouping separators.
Parameters:
  number - the number to format formatted integer number



formatPercentage
public String formatPercentage(long number)(Code)
Formats an integral percentage value using locale-specific rules. This method places the locale-specific percent sign at the correct position in relation to the number, with the appropriate number of space (possibly none) between the sign and the number.

A percentage is expressed as an integer value. Negative percentages are allowed.
Parameters:
  number - the number to format formatted percentage number




formatPercentage
public String formatPercentage(float number, int decimals)(Code)
Formats a percentage with the specified number of decimals using locale-specific rules. This method places the locale-specific percent sign at the correct position in relation to the number, with the appropriate amount of space (possibly none) between the sign and the number.

A percentage is expressed as a decimal number, with the value 0.0 interpreted as 0% and the value 1.0 as 100%. Percentages larger than 100% are expressed as values greater than 1.0. Negative percentages are allowed, and expressed as values smaller than 0.0. The percentage is rounded to the specified number of decimals.

The number of decimals MUST be between 1 and 15. The formatted result MUST have exactly the specified number of decimals, even if some of the trailing digits are zeroes.
Parameters:
  number - the percentage to format, expressed as a positive ornegative number
Parameters:
  decimals - the number of decimals to use (1 <= decimals <=15) formatted percentage string




Methods inherited from java.lang.Object
public boolean equals(Object obj)(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.