Java Doc for AbstractDateTime.java in  » Development » Joda-Time » org » joda » time » base » 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 » Development » Joda Time » org.joda.time.base 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.joda.time.base.AbstractInstant
      org.joda.time.base.AbstractDateTime

All known Subclasses:   org.joda.time.base.BaseDateTime,
AbstractDateTime
abstract public class AbstractDateTime extends AbstractInstant implements ReadableDateTime(Code)
AbstractDateTime provides the common behaviour for datetime classes.

This class should generally not be used directly by API users. The ReadableDateTime interface should be used when different kinds of date/time objects are to be referenced.

Whenever you want to implement ReadableDateTime you should extend this class.

AbstractDateTime subclasses may be mutable and not thread-safe.
author:
   Brian S O'Neill
author:
   Stephen Colebourne
since:
   1.0




Constructor Summary
protected  AbstractDateTime()
     Constructor.

Method Summary
public  intget(DateTimeFieldType type)
     Get the value of one of the fields of a datetime.
public  intgetCenturyOfEra()
     Get the year of era field value.
public  intgetDayOfMonth()
     Get the day of month field value.
public  intgetDayOfWeek()
     Get the day of week field value.
public  intgetDayOfYear()
     Get the day of year field value.
public  intgetEra()
     Get the era field value.
public  intgetHourOfDay()
     Get the hour of day field value.
public  intgetMillisOfDay()
     Get the millis of day field value.
public  intgetMillisOfSecond()
     Get the millis of second field value.
public  intgetMinuteOfDay()
     Get the minute of day field value.
public  intgetMinuteOfHour()
     Get the minute of hour field value.
public  intgetMonthOfYear()
     Get the month of year field value.
public  intgetSecondOfDay()
     Get the second of day field value.
public  intgetSecondOfMinute()
     Get the second of minute field value.
public  intgetWeekOfWeekyear()
     Get the week of weekyear field value.
public  intgetWeekyear()
     Get the weekyear field value.
public  intgetYear()
     Get the year field value.
public  intgetYearOfCentury()
     Get the year of century field value.
public  intgetYearOfEra()
     Get the year of era field value.
public  CalendartoCalendar(Locale locale)
     Get the date time as a java.util.Calendar, assigning exactly the same millisecond instant. The locale is passed in, enabling Calendar to select the correct localized subclass.

The JDK and Joda-Time both have time zone implementations and these differ in accuracy.

public  GregorianCalendartoGregorianCalendar()
     Get the date time as a java.util.GregorianCalendar, assigning exactly the same millisecond instant.

The JDK and Joda-Time both have time zone implementations and these differ in accuracy.

public  StringtoString(String pattern)
     Output the instant using the specified format pattern.
public  StringtoString(String pattern, Locale locale)
     Output the instant using the specified format pattern.


Constructor Detail
AbstractDateTime
protected AbstractDateTime()(Code)
Constructor.




Method Detail
get
public int get(DateTimeFieldType type)(Code)
Get the value of one of the fields of a datetime.

This method uses the chronology of the datetime to obtain the value. It is essentially a generic way of calling one of the get methods.
Parameters:
  type - a field type, usually obtained from DateTimeFieldType the value of that field
throws:
  IllegalArgumentException - if the field type is null




getCenturyOfEra
public int getCenturyOfEra()(Code)
Get the year of era field value. the year of era



getDayOfMonth
public int getDayOfMonth()(Code)
Get the day of month field value.

The values for the day of month are defined in org.joda.time.DateTimeConstants . the day of month




getDayOfWeek
public int getDayOfWeek()(Code)
Get the day of week field value.

The values for the day of week are defined in org.joda.time.DateTimeConstants . the day of week




getDayOfYear
public int getDayOfYear()(Code)
Get the day of year field value. the day of year



getEra
public int getEra()(Code)
Get the era field value. the era



getHourOfDay
public int getHourOfDay()(Code)
Get the hour of day field value. the hour of day



getMillisOfDay
public int getMillisOfDay()(Code)
Get the millis of day field value. the millis of day



getMillisOfSecond
public int getMillisOfSecond()(Code)
Get the millis of second field value. the millis of second



getMinuteOfDay
public int getMinuteOfDay()(Code)
Get the minute of day field value. the minute of day



getMinuteOfHour
public int getMinuteOfHour()(Code)
Get the minute of hour field value. the minute of hour



getMonthOfYear
public int getMonthOfYear()(Code)
Get the month of year field value. the month of year



getSecondOfDay
public int getSecondOfDay()(Code)
Get the second of day field value. the second of day



getSecondOfMinute
public int getSecondOfMinute()(Code)
Get the second of minute field value. the second of minute



getWeekOfWeekyear
public int getWeekOfWeekyear()(Code)
Get the week of weekyear field value. the week of a week based year



getWeekyear
public int getWeekyear()(Code)
Get the weekyear field value. the year of a week based year



getYear
public int getYear()(Code)
Get the year field value. the year



getYearOfCentury
public int getYearOfCentury()(Code)
Get the year of century field value. the year of century



getYearOfEra
public int getYearOfEra()(Code)
Get the year of era field value. the year of era



toCalendar
public Calendar toCalendar(Locale locale)(Code)
Get the date time as a java.util.Calendar, assigning exactly the same millisecond instant. The locale is passed in, enabling Calendar to select the correct localized subclass.

The JDK and Joda-Time both have time zone implementations and these differ in accuracy. Joda-Time's implementation is generally more up to date and thus more accurate - for example JDK1.3 has no historical data. The effect of this is that the field values of the Calendar may differ from those of this object, even though the milliseond value is the same. Most of the time this just means that the JDK field values are wrong, as our time zone information is more up to date.
Parameters:
  locale - the locale to get the Calendar for, or default if null a localized Calendar initialised with this datetime




toGregorianCalendar
public GregorianCalendar toGregorianCalendar()(Code)
Get the date time as a java.util.GregorianCalendar, assigning exactly the same millisecond instant.

The JDK and Joda-Time both have time zone implementations and these differ in accuracy. Joda-Time's implementation is generally more up to date and thus more accurate - for example JDK1.3 has no historical data. The effect of this is that the field values of the Calendar may differ from those of this object, even though the milliseond value is the same. Most of the time this just means that the JDK field values are wrong, as our time zone information is more up to date. a GregorianCalendar initialised with this datetime




toString
public String toString(String pattern)(Code)
Output the instant using the specified format pattern.
Parameters:
  pattern - the pattern specification, null means use toString
See Also:   org.joda.time.format.DateTimeFormat



toString
public String toString(String pattern, Locale locale) throws IllegalArgumentException(Code)
Output the instant using the specified format pattern.
Parameters:
  pattern - the pattern specification, null means use toString
Parameters:
  locale - Locale to use, null means default
See Also:   org.joda.time.format.DateTimeFormat



Methods inherited from org.joda.time.base.AbstractInstant
public int compareTo(Object instant)(Code)(Java Doc)
public boolean equals(Object readableInstant)(Code)(Java Doc)
public int get(DateTimeFieldType type)(Code)(Java Doc)
public int get(DateTimeField field)(Code)(Java Doc)
public DateTimeZone getZone()(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
public boolean isAfter(long instant)(Code)(Java Doc)
public boolean isAfter(ReadableInstant instant)(Code)(Java Doc)
public boolean isAfterNow()(Code)(Java Doc)
public boolean isBefore(long instant)(Code)(Java Doc)
public boolean isBefore(ReadableInstant instant)(Code)(Java Doc)
public boolean isBeforeNow()(Code)(Java Doc)
public boolean isEqual(long instant)(Code)(Java Doc)
public boolean isEqual(ReadableInstant instant)(Code)(Java Doc)
public boolean isEqualNow()(Code)(Java Doc)
public boolean isSupported(DateTimeFieldType type)(Code)(Java Doc)
public Date toDate()(Code)(Java Doc)
public DateTime toDateTime()(Code)(Java Doc)
public DateTime toDateTime(DateTimeZone zone)(Code)(Java Doc)
public DateTime toDateTime(Chronology chronology)(Code)(Java Doc)
public DateTime toDateTimeISO()(Code)(Java Doc)
public Instant toInstant()(Code)(Java Doc)
public MutableDateTime toMutableDateTime()(Code)(Java Doc)
public MutableDateTime toMutableDateTime(DateTimeZone zone)(Code)(Java Doc)
public MutableDateTime toMutableDateTime(Chronology chronology)(Code)(Java Doc)
public MutableDateTime toMutableDateTimeISO()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
public String toString(DateTimeFormatter formatter)(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.