Source Code Cross Referenced for UFormat.java in  » Internationalization-Localization » icu4j » com » ibm » icu » text » 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 » Internationalization Localization » icu4j » com.ibm.icu.text 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         *******************************************************************************
003:         * Copyright (C) 2003-2006, International Business Machines Corporation and    *
004:         * others. All Rights Reserved.                                                *
005:         *******************************************************************************
006:         */
007:        package com.ibm.icu.text;
008:
009:        import java.text.Format;
010:        import com.ibm.icu.util.ULocale;
011:
012:        /**
013:         * An abstract class that extends {@link java.text.Format} to provide
014:         * additional ICU protocol, specifically, the <tt>getLocale()</tt>
015:         * API.  All ICU format classes are subclasses of this class.
016:         *
017:         * @see com.ibm.icu.util.ULocale
018:         * @author weiv
019:         * @author Alan Liu
020:         * @draft ICU 2.8 (retain)
021:         * @provisional This API might change or be removed in a future release.
022:         */
023:        public abstract class UFormat extends Format {
024:            // jdk1.4.2 serialver
025:            private static final long serialVersionUID = -4964390515840164416L;
026:
027:            /**
028:             * @draft ICU 2.8 (retain)
029:             * @provisional This API might change or be removed in a future release.
030:             */
031:            public UFormat() {
032:            }
033:
034:            // -------- BEGIN ULocale boilerplate --------
035:
036:            /**
037:             * Return the locale that was used to create this object, or null.
038:             * This may may differ from the locale requested at the time of
039:             * this object's creation.  For example, if an object is created
040:             * for locale <tt>en_US_CALIFORNIA</tt>, the actual data may be
041:             * drawn from <tt>en</tt> (the <i>actual</i> locale), and
042:             * <tt>en_US</tt> may be the most specific locale that exists (the
043:             * <i>valid</i> locale).
044:             *
045:             * <p>Note: This method will be implemented in ICU 3.0; ICU 2.8
046:             * contains a partial preview implementation.  The <i>actual</i>
047:             * locale is returned correctly, but the <i>valid</i> locale is
048:             * not, in most cases.
049:             * @param type type of information requested, either {@link
050:             * com.ibm.icu.util.ULocale#VALID_LOCALE} or {@link
051:             * com.ibm.icu.util.ULocale#ACTUAL_LOCALE}.
052:             * @return the information specified by <i>type</i>, or null if
053:             * this object was not constructed from locale data.
054:             * @see com.ibm.icu.util.ULocale
055:             * @see com.ibm.icu.util.ULocale#VALID_LOCALE
056:             * @see com.ibm.icu.util.ULocale#ACTUAL_LOCALE
057:             * @draft ICU 2.8 (retain)
058:             * @provisional This API might change or be removed in a future release.
059:             */
060:            public final ULocale getLocale(ULocale.Type type) {
061:                return type == ULocale.ACTUAL_LOCALE ? this .actualLocale
062:                        : this .validLocale;
063:            }
064:
065:            /**
066:             * Set information about the locales that were used to create this
067:             * object.  If the object was not constructed from locale data,
068:             * both arguments should be set to null.  Otherwise, neither
069:             * should be null.  The actual locale must be at the same level or
070:             * less specific than the valid locale.  This method is intended
071:             * for use by factories or other entities that create objects of
072:             * this class.
073:             * @param valid the most specific locale containing any resource
074:             * data, or null
075:             * @param actual the locale containing data used to construct this
076:             * object, or null
077:             * @see com.ibm.icu.util.ULocale
078:             * @see com.ibm.icu.util.ULocale#VALID_LOCALE
079:             * @see com.ibm.icu.util.ULocale#ACTUAL_LOCALE
080:             * @internal
081:             */
082:            final void setLocale(ULocale valid, ULocale actual) {
083:                // Change the following to an assertion later
084:                if ((valid == null) != (actual == null)) {
085:                    ///CLOVER:OFF
086:                    throw new IllegalArgumentException();
087:                    ///CLOVER:ON
088:                }
089:                // Another check we could do is that the actual locale is at
090:                // the same level or less specific than the valid locale.
091:                this .validLocale = valid;
092:                this .actualLocale = actual;
093:            }
094:
095:            /**
096:             * The most specific locale containing any resource data, or null.
097:             * @see com.ibm.icu.util.ULocale
098:             * @internal
099:             */
100:            private ULocale validLocale;
101:
102:            /**
103:             * The locale containing data used to construct this object, or
104:             * null.
105:             * @see com.ibm.icu.util.ULocale
106:             * @internal
107:             */
108:            private ULocale actualLocale;
109:
110:            // -------- END ULocale boilerplate --------
111:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.