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


java.lang.Object
   com.ibm.icu.util.TimeZone
      com.ibm.icu.impl.OlsonTimeZone

OlsonTimeZone
public class OlsonTimeZone extends TimeZone (Code)
A time zone based on the Olson database. Olson time zones change behavior over time. The raw offset, rules, presence or absence of daylight savings time, and even the daylight savings amount can all vary. This class uses a resource bundle named "zoneinfo". Zoneinfo is a table containing different kinds of resources. In several places, zones are referred to using integers. A zone's integer is a number from 0..n-1, where n is the number of zones, with the zones sorted in lexicographic order. 1. Zones. These have keys corresponding to the Olson IDs, e.g., "Asia/Shanghai". Each resource describes the behavior of the given zone. Zones come in several formats, which are differentiated based on length. a. Alias (int, length 1). An alias zone is an int resource. The integer is the zone number of the target zone. The key of this resource is an alternate name for the target zone. Aliases represent Olson links and ICU compatibility IDs. b. Simple zone (array, length 3). The three subelements are: i. An intvector of transitions. These are given in epoch seconds. This may be an empty invector (length 0). If the transtions list is empty, then the zone's behavior is fixed and given by the offset list, which will contain exactly one pair. Otherwise each transtion indicates a time after which (inclusive) the associated offset pair is in effect. ii. An intvector of offsets. These are in pairs of raw offset / DST offset, in units of seconds. There will be at least one pair (length >= 2 && length % 2 == 0). iii. A binary resource. This is of the same length as the transitions vector, so length may be zero. Each unsigned byte corresponds to one transition, and has a value of 0..n-1, where n is the number of pairs in the offset vector. This forms a map between transitions and offset pairs. c. Simple zone with aliases (array, length 4). This is like a simple zone, but also contains a fourth element: iv. An intvector of aliases. This list includes this zone itself, and lists all aliases of this zone. d. Complex zone (array, length 5). This is like a simple zone, but contains two more elements: iv. A string, giving the name of a rule. This is the "final rule", which governs the zone's behavior beginning in the "final year". The rule ID is given without leading underscore, e.g., "EU". v. An intvector of length 2, containing the raw offset for the final rule (in seconds), and the final year. The final rule takes effect for years >= the final year. e. Complex zone with aliases (array, length 6). This is like a complex zone, but also contains a sixth element: vi. An intvector of aliases. This list includes this zone itself, and lists all aliases of this zone. 2. Rules. These have keys corresponding to the Olson rule IDs, with an underscore prepended, e.g., "_EU". Each resource describes the behavior of the given rule using an intvector, containing the onset list, the cessation list, and the DST savings. The onset and cessation lists consist of the month, dowim, dow, time, and time mode. The end result is that the 11 integers describing the rule can be passed directly into the SimpleTimeZone 13-argument constructor (the other two arguments will be the raw offset, taken from the complex zone element 5, and the ID string, which is not used), with the times and the DST savings multiplied by 1000 to scale from seconds to milliseconds. 3. Countries. These have keys corresponding to the 2-letter ISO country codes, with a percent sign prepended, e.g., "%US". Each resource is an intvector listing the zones associated with the given country. The special entry "%" corresponds to "no country", that is, the category of zones assigned to no country in the Olson DB. 4. Metadata. Metadata is stored under the key "_". It is an intvector of length three containing the number of zones resources, rule resources, and country resources. For the purposes of this count, the metadata entry itself is considered a rule resource, since its key begins with an underscore.


Field Summary
final static  longserialVersionUID
    

Constructor Summary
public  OlsonTimeZone(ICUResourceBundle top, ICUResourceBundle res)
     Construct from a resource bundle
Parameters:
  top - the top-level zoneinfo resource bundle.
public  OlsonTimeZone()
    
public  OlsonTimeZone(String id)
    

Method Summary
public  Objectclone()
    
 int[]dayToFields(double day)
    
public  booleanequals(Object obj)
    
 double[]floorDivide(double dividend, double divisor)
    
public  intgetDSTSavings()
     TimeZone API Returns the amount of time to be added to local standard time to get local wall clock time.
public  intgetOffset(int era, int year, int month, int day, int dayOfWeek, int milliseconds)
    
public  intgetOffset(int era, int year, int month, int dom, int dow, int millis, int monthLength)
     TimeZone API.
public  voidgetOffset(long date, boolean local, int[] offsets)
     TimeZone API.
public  intgetRawOffset()
    
public  inthashCode()
    
public  booleaninDaylightTime(Date date)
    
public  voidsetID(String id)
    
public  voidsetRawOffset(int offsetMillis)
    
public  StringtoString()
    
public  booleanuseDaylightTime()
    

Field Detail
serialVersionUID
final static long serialVersionUID(Code)




Constructor Detail
OlsonTimeZone
public OlsonTimeZone(ICUResourceBundle top, ICUResourceBundle res)(Code)
Construct from a resource bundle
Parameters:
  top - the top-level zoneinfo resource bundle. This is usedto lookup the rule that `res' may refer to, if there is one.
Parameters:
  res - the resource bundle of the zone to be constructed



OlsonTimeZone
public OlsonTimeZone()(Code)



OlsonTimeZone
public OlsonTimeZone(String id)(Code)




Method Detail
clone
public Object clone()(Code)



dayToFields
int[] dayToFields(double day)(Code)



equals
public boolean equals(Object obj)(Code)



floorDivide
double[] floorDivide(double dividend, double divisor)(Code)



getDSTSavings
public int getDSTSavings()(Code)
TimeZone API Returns the amount of time to be added to local standard time to get local wall clock time.



getOffset
public int getOffset(int era, int year, int month, int day, int dayOfWeek, int milliseconds)(Code)



getOffset
public int getOffset(int era, int year, int month, int dom, int dow, int millis, int monthLength)(Code)
TimeZone API.



getOffset
public void getOffset(long date, boolean local, int[] offsets)(Code)
TimeZone API.



getRawOffset
public int getRawOffset()(Code)



hashCode
public int hashCode()(Code)



inDaylightTime
public boolean inDaylightTime(Date date)(Code)



setID
public void setID(String id)(Code)



setRawOffset
public void setRawOffset(int offsetMillis)(Code)



toString
public String toString()(Code)



useDaylightTime
public boolean useDaylightTime()(Code)



Fields inherited from com.ibm.icu.util.TimeZone
final public static int LONG(Code)(Java Doc)
final protected static int MILLIS_PER_DAY(Code)(Java Doc)
final protected static int MILLIS_PER_HOUR(Code)(Java Doc)
final public static int SHORT(Code)(Java Doc)

Methods inherited from com.ibm.icu.util.TimeZone
public Object clone()(Code)(Java Doc)
public static int countEquivalentIDs(String id)(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
public static String[] getAvailableIDs(int rawOffset)(Code)(Java Doc)
public static String[] getAvailableIDs(String country)(Code)(Java Doc)
public static String[] getAvailableIDs()(Code)(Java Doc)
public int getDSTSavings()(Code)(Java Doc)
public static synchronized TimeZone getDefault()(Code)(Java Doc)
final public String getDisplayName()(Code)(Java Doc)
final public String getDisplayName(Locale locale)(Code)(Java Doc)
final public String getDisplayName(ULocale locale)(Code)(Java Doc)
final public String getDisplayName(boolean daylight, int style)(Code)(Java Doc)
public String getDisplayName(boolean daylight, int style, Locale locale)(Code)(Java Doc)
public String getDisplayName(boolean daylight, int style, ULocale locale)(Code)(Java Doc)
public static String getEquivalentID(String id, int index)(Code)(Java Doc)
public String getID()(Code)(Java Doc)
abstract public int getOffset(int era, int year, int month, int day, int dayOfWeek, int milliseconds)(Code)(Java Doc)
public int getOffset(long date)(Code)(Java Doc)
public void getOffset(long date, boolean local, int[] offsets)(Code)(Java Doc)
abstract public int getRawOffset()(Code)(Java Doc)
public static synchronized TimeZone getTimeZone(String ID)(Code)(Java Doc)
public boolean hasSameRules(TimeZone other)(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
abstract public boolean inDaylightTime(Date date)(Code)(Java Doc)
public static synchronized void setDefault(TimeZone tz)(Code)(Java Doc)
public void setID(String ID)(Code)(Java Doc)
abstract public void setRawOffset(int offsetMillis)(Code)(Java Doc)
abstract public boolean useDaylightTime()(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(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.