Java Doc for BaseDateTime.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
         org.joda.time.base.BaseDateTime

All known Subclasses:   org.joda.time.MutableDateTime,  org.joda.time.DateTime,  org.joda.time.DateMidnight,
BaseDateTime
abstract public class BaseDateTime extends AbstractDateTime implements ReadableDateTime,Serializable(Code)
BaseDateTime is an abstract implementation of ReadableDateTime that stores data in long and Chronology fields.

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.

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




Constructor Summary
public  BaseDateTime()
     Constructs an instance set to the current system millisecond time using ISOChronology in the default time zone.
public  BaseDateTime(DateTimeZone zone)
     Constructs an instance set to the current system millisecond time using ISOChronology in the specified time zone.
public  BaseDateTime(Chronology chronology)
     Constructs an instance set to the current system millisecond time using the specified chronology.
public  BaseDateTime(long instant)
     Constructs an instance set to the milliseconds from 1970-01-01T00:00:00Z using ISOChronology in the default time zone.
public  BaseDateTime(long instant, DateTimeZone zone)
     Constructs an instance set to the milliseconds from 1970-01-01T00:00:00Z using ISOChronology in the specified time zone.
public  BaseDateTime(long instant, Chronology chronology)
     Constructs an instance set to the milliseconds from 1970-01-01T00:00:00Z using the specified chronology.
public  BaseDateTime(Object instant, DateTimeZone zone)
     Constructs an instance from an Object that represents a datetime, forcing the time zone to that specified.
public  BaseDateTime(Object instant, Chronology chronology)
     Constructs an instance from an Object that represents a datetime, using the specified chronology.
public  BaseDateTime(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute, int millisOfSecond)
     Constructs an instance from datetime field values using ISOChronology in the default time zone.
public  BaseDateTime(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute, int millisOfSecond, DateTimeZone zone)
     Constructs an instance from datetime field values using ISOChronology in the specified time zone.
public  BaseDateTime(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute, int millisOfSecond, Chronology chronology)
     Constructs an instance from datetime field values using the specified chronology.

Method Summary
protected  ChronologycheckChronology(Chronology chronology)
     Checks the specified chronology before storing it, potentially altering it.
protected  longcheckInstant(long instant, Chronology chronology)
     Checks the specified instant before storing it, potentially altering it.
public  ChronologygetChronology()
     Gets the chronology of the datetime.
public  longgetMillis()
     Gets the milliseconds of the datetime instant from the Java epoch of 1970-01-01T00:00:00Z.
protected  voidsetChronology(Chronology chronology)
     Sets the chronology of the datetime.
protected  voidsetMillis(long instant)
     Sets the milliseconds of the datetime.


Constructor Detail
BaseDateTime
public BaseDateTime()(Code)
Constructs an instance set to the current system millisecond time using ISOChronology in the default time zone.



BaseDateTime
public BaseDateTime(DateTimeZone zone)(Code)
Constructs an instance set to the current system millisecond time using ISOChronology in the specified time zone.

If the specified time zone is null, the default zone is used.
Parameters:
  zone - the time zone, null means default zone




BaseDateTime
public BaseDateTime(Chronology chronology)(Code)
Constructs an instance set to the current system millisecond time using the specified chronology.

If the chronology is null, ISOChronology in the default time zone is used.
Parameters:
  chronology - the chronology, null means ISOChronology in default zone




BaseDateTime
public BaseDateTime(long instant)(Code)
Constructs an instance set to the milliseconds from 1970-01-01T00:00:00Z using ISOChronology in the default time zone.
Parameters:
  instant - the milliseconds from 1970-01-01T00:00:00Z



BaseDateTime
public BaseDateTime(long instant, DateTimeZone zone)(Code)
Constructs an instance set to the milliseconds from 1970-01-01T00:00:00Z using ISOChronology in the specified time zone.

If the specified time zone is null, the default zone is used.
Parameters:
  instant - the milliseconds from 1970-01-01T00:00:00Z
Parameters:
  zone - the time zone, null means default zone




BaseDateTime
public BaseDateTime(long instant, Chronology chronology)(Code)
Constructs an instance set to the milliseconds from 1970-01-01T00:00:00Z using the specified chronology.

If the chronology is null, ISOChronology in the default time zone is used.
Parameters:
  instant - the milliseconds from 1970-01-01T00:00:00Z
Parameters:
  chronology - the chronology, null means ISOChronology in default zone




BaseDateTime
public BaseDateTime(Object instant, DateTimeZone zone)(Code)
Constructs an instance from an Object that represents a datetime, forcing the time zone to that specified.

If the object contains no chronology, ISOChronology is used. If the specified time zone is null, the default zone is used.

The recognised object types are defined in org.joda.time.convert.ConverterManager ConverterManager and include ReadableInstant, String, Calendar and Date.
Parameters:
  instant - the datetime object
Parameters:
  zone - the time zone
throws:
  IllegalArgumentException - if the instant is invalid




BaseDateTime
public BaseDateTime(Object instant, Chronology chronology)(Code)
Constructs an instance from an Object that represents a datetime, using the specified chronology.

If the chronology is null, ISO in the default time zone is used.

The recognised object types are defined in org.joda.time.convert.ConverterManager ConverterManager and include ReadableInstant, String, Calendar and Date.
Parameters:
  instant - the datetime object
Parameters:
  chronology - the chronology
throws:
  IllegalArgumentException - if the instant is invalid




BaseDateTime
public BaseDateTime(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute, int millisOfSecond)(Code)
Constructs an instance from datetime field values using ISOChronology in the default time zone.
Parameters:
  year - the year
Parameters:
  monthOfYear - the month of the year
Parameters:
  dayOfMonth - the day of the month
Parameters:
  hourOfDay - the hour of the day
Parameters:
  minuteOfHour - the minute of the hour
Parameters:
  secondOfMinute - the second of the minute
Parameters:
  millisOfSecond - the millisecond of the second



BaseDateTime
public BaseDateTime(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute, int millisOfSecond, DateTimeZone zone)(Code)
Constructs an instance from datetime field values using ISOChronology in the specified time zone.

If the specified time zone is null, the default zone is used.
Parameters:
  year - the year
Parameters:
  monthOfYear - the month of the year
Parameters:
  dayOfMonth - the day of the month
Parameters:
  hourOfDay - the hour of the day
Parameters:
  minuteOfHour - the minute of the hour
Parameters:
  secondOfMinute - the second of the minute
Parameters:
  millisOfSecond - the millisecond of the second
Parameters:
  zone - the time zone, null means default time zone




BaseDateTime
public BaseDateTime(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute, int millisOfSecond, Chronology chronology)(Code)
Constructs an instance from datetime field values using the specified chronology.

If the chronology is null, ISOChronology in the default time zone is used.
Parameters:
  year - the year
Parameters:
  monthOfYear - the month of the year
Parameters:
  dayOfMonth - the day of the month
Parameters:
  hourOfDay - the hour of the day
Parameters:
  minuteOfHour - the minute of the hour
Parameters:
  secondOfMinute - the second of the minute
Parameters:
  millisOfSecond - the millisecond of the second
Parameters:
  chronology - the chronology, null means ISOChronology in default zone





Method Detail
checkChronology
protected Chronology checkChronology(Chronology chronology)(Code)
Checks the specified chronology before storing it, potentially altering it. This method must not access any instance variables.

This implementation converts nulls to ISOChronology in the default zone.
Parameters:
  chronology - the chronology to use, may be null the chronology to store in this datetime, not null




checkInstant
protected long checkInstant(long instant, Chronology chronology)(Code)
Checks the specified instant before storing it, potentially altering it. This method must not access any instance variables.

This implementation simply returns the instant.
Parameters:
  instant - the milliseconds from 1970-01-01T00:00:00Z to round
Parameters:
  chronology - the chronology to use, not null the instant to store in this datetime




getChronology
public Chronology getChronology()(Code)
Gets the chronology of the datetime. the Chronology that the datetime is using



getMillis
public long getMillis()(Code)
Gets the milliseconds of the datetime instant from the Java epoch of 1970-01-01T00:00:00Z. the number of milliseconds since 1970-01-01T00:00:00Z



setChronology
protected void setChronology(Chronology chronology)(Code)
Sets the chronology of the datetime.

All changes to the chronology field occurs via this method. Override and block this method to make a subclass immutable.
Parameters:
  chronology - the chronology to set




setMillis
protected void setMillis(long instant)(Code)
Sets the milliseconds of the datetime.

All changes to the millisecond field occurs via this method. Override and block this method to make a subclass immutable.
Parameters:
  instant - the milliseconds since 1970-01-01T00:00:00Z to set the datetime to




Methods inherited from org.joda.time.base.AbstractDateTime
public int get(DateTimeFieldType type)(Code)(Java Doc)
public int getCenturyOfEra()(Code)(Java Doc)
public int getDayOfMonth()(Code)(Java Doc)
public int getDayOfWeek()(Code)(Java Doc)
public int getDayOfYear()(Code)(Java Doc)
public int getEra()(Code)(Java Doc)
public int getHourOfDay()(Code)(Java Doc)
public int getMillisOfDay()(Code)(Java Doc)
public int getMillisOfSecond()(Code)(Java Doc)
public int getMinuteOfDay()(Code)(Java Doc)
public int getMinuteOfHour()(Code)(Java Doc)
public int getMonthOfYear()(Code)(Java Doc)
public int getSecondOfDay()(Code)(Java Doc)
public int getSecondOfMinute()(Code)(Java Doc)
public int getWeekOfWeekyear()(Code)(Java Doc)
public int getWeekyear()(Code)(Java Doc)
public int getYear()(Code)(Java Doc)
public int getYearOfCentury()(Code)(Java Doc)
public int getYearOfEra()(Code)(Java Doc)
public Calendar toCalendar(Locale locale)(Code)(Java Doc)
public GregorianCalendar toGregorianCalendar()(Code)(Java Doc)
public String toString(String pattern)(Code)(Java Doc)
public String toString(String pattern, Locale locale) throws IllegalArgumentException(Code)(Java Doc)

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.