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


java.lang.Object
   org.joda.time.Chronology
      org.joda.time.chrono.BaseChronology

All known Subclasses:   org.joda.time.convert.MockBadChronology,  org.joda.time.chrono.AssembledChronology,  org.joda.time.MockNullZoneChronology,  org.joda.time.chrono.gj.TestGJChronology,
BaseChronology
abstract public class BaseChronology extends Chronology implements Serializable(Code)
BaseChronology provides a skeleton implementation for chronology classes. Many utility methods are defined, but all fields are unsupported.

BaseChronology is thread-safe and immutable, and all subclasses must be as well.
author:
   Brian S O'Neill
since:
   1.0




Constructor Summary
protected  BaseChronology()
     Restricted constructor.

Method Summary
public  longadd(ReadablePeriod period, long instant, int scalar)
     Adds the period to the instant, specifying the number of times to add.
public  longadd(long instant, long duration, int scalar)
     Adds the duration to the instant, specifying the number of times to add.
public  DurationFieldcenturies()
     Get the centuries duration field for this chronology.
public  DateTimeFieldcenturyOfEra()
     Get the century of era field for this chronology.
public  DateTimeFieldclockhourOfDay()
     Get the hour of day (offset to 1-24) field for this chronology.
public  DateTimeFieldclockhourOfHalfday()
     Get the hour of am/pm (offset to 1-12) field for this chronology.
public  DateTimeFielddayOfMonth()
     Get the day of month field for this chronology.
public  DateTimeFielddayOfWeek()
     Get the day of week field for this chronology.
public  DateTimeFielddayOfYear()
     Get the day of year field for this chronology.
public  DurationFielddays()
     Get the days duration field for this chronology.
public  DateTimeFieldera()
     Get the era field for this chronology.
public  DurationFielderas()
     Get the eras duration field for this chronology.
public  int[]get(ReadablePartial partial, long instant)
     Gets the values of a partial from an instant.
public  int[]get(ReadablePeriod period, long startInstant, long endInstant)
     Gets the values of a period from an interval.
public  int[]get(ReadablePeriod period, long duration)
     Gets the values of a period from an interval.
public  longgetDateTimeMillis(int year, int monthOfYear, int dayOfMonth, int millisOfDay)
     Returns a datetime millisecond instant, formed from the given year, month, day, and millisecond values.
public  longgetDateTimeMillis(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute, int millisOfSecond)
     Returns a datetime millisecond instant, formed from the given year, month, day, hour, minute, second, and millisecond values.
public  longgetDateTimeMillis(long instant, int hourOfDay, int minuteOfHour, int secondOfMinute, int millisOfSecond)
     Returns a datetime millisecond instant, from from the given instant, hour, minute, second, and millisecond values.
abstract public  DateTimeZonegetZone()
     Returns the DateTimeZone that this Chronology operates in, or null if unspecified.
public  DateTimeFieldhalfdayOfDay()
     Get the AM(0) PM(1) field for this chronology.
public  DurationFieldhalfdays()
     Get the halfdays duration field for this chronology.
public  DateTimeFieldhourOfDay()
     Get the hour of day (0-23) field for this chronology.
public  DateTimeFieldhourOfHalfday()
     Get the hour of am/pm (0-11) field for this chronology.
public  DurationFieldhours()
     Get the hours duration field for this chronology.
public  DurationFieldmillis()
     Get the millis duration field for this chronology.
public  DateTimeFieldmillisOfDay()
     Get the millis of day field for this chronology.
public  DateTimeFieldmillisOfSecond()
     Get the millis of second field for this chronology.
public  DateTimeFieldminuteOfDay()
     Get the minute of day field for this chronology.
public  DateTimeFieldminuteOfHour()
     Get the minute of hour field for this chronology.
public  DurationFieldminutes()
     Get the minutes duration field for this chronology.
public  DateTimeFieldmonthOfYear()
     Get the month of year field for this chronology.
public  DurationFieldmonths()
     Get the months duration field for this chronology.
public  DateTimeFieldsecondOfDay()
     Get the second of day field for this chronology.
public  DateTimeFieldsecondOfMinute()
     Get the second of minute field for this chronology.
public  DurationFieldseconds()
     Get the seconds duration field for this chronology.
public  longset(ReadablePartial partial, long instant)
     Sets the partial into the instant.
abstract public  StringtoString()
     Gets a debugging toString.
public  voidvalidate(ReadablePartial partial, int[] values)
     Validates whether the fields stored in a partial instant are valid.
public  DateTimeFieldweekOfWeekyear()
     Get the week of a week based year field for this chronology.
public  DurationFieldweeks()
     Get the weeks duration field for this chronology.
public  DateTimeFieldweekyear()
     Get the year of a week based year field for this chronology.
public  DateTimeFieldweekyearOfCentury()
     Get the year of a week based year in a century field for this chronology.
public  DurationFieldweekyears()
     Get the weekyears duration field for this chronology.
abstract public  ChronologywithUTC()
     Returns an instance of this Chronology that operates in the UTC time zone.
abstract public  ChronologywithZone(DateTimeZone zone)
     Returns an instance of this Chronology that operates in any time zone.
public  DateTimeFieldyear()
     Get the year field for this chronology.
public  DateTimeFieldyearOfCentury()
     Get the year of century field for this chronology.
public  DateTimeFieldyearOfEra()
     Get the year of era field for this chronology.
public  DurationFieldyears()
     Get the years duration field for this chronology.


Constructor Detail
BaseChronology
protected BaseChronology()(Code)
Restricted constructor.




Method Detail
add
public long add(ReadablePeriod period, long instant, int scalar)(Code)
Adds the period to the instant, specifying the number of times to add.
Parameters:
  period - the period to add, null means add nothing
Parameters:
  instant - the instant to add to
Parameters:
  scalar - the number of times to add the updated instant



add
public long add(long instant, long duration, int scalar)(Code)
Adds the duration to the instant, specifying the number of times to add.
Parameters:
  instant - the instant to add to
Parameters:
  duration - the duration to add
Parameters:
  scalar - the number of times to add the updated instant



centuries
public DurationField centuries()(Code)
Get the centuries duration field for this chronology. DurationField or UnsupportedDurationField if unsupported



centuryOfEra
public DateTimeField centuryOfEra()(Code)
Get the century of era field for this chronology. DateTimeField or UnsupportedDateTimeField if unsupported



clockhourOfDay
public DateTimeField clockhourOfDay()(Code)
Get the hour of day (offset to 1-24) field for this chronology. DateTimeField or UnsupportedDateTimeField if unsupported



clockhourOfHalfday
public DateTimeField clockhourOfHalfday()(Code)
Get the hour of am/pm (offset to 1-12) field for this chronology. DateTimeField or UnsupportedDateTimeField if unsupported



dayOfMonth
public DateTimeField dayOfMonth()(Code)
Get the day of month field for this chronology. DateTimeField or UnsupportedDateTimeField if unsupported



dayOfWeek
public DateTimeField dayOfWeek()(Code)
Get the day of week field for this chronology.

DayOfWeek values are defined in org.joda.time.DateTimeConstants DateTimeConstants . They use the ISO definitions, where 1 is Monday and 7 is Sunday. DateTimeField or UnsupportedDateTimeField if unsupported




dayOfYear
public DateTimeField dayOfYear()(Code)
Get the day of year field for this chronology. DateTimeField or UnsupportedDateTimeField if unsupported



days
public DurationField days()(Code)
Get the days duration field for this chronology. DurationField or UnsupportedDurationField if unsupported



era
public DateTimeField era()(Code)
Get the era field for this chronology. DateTimeField or UnsupportedDateTimeField if unsupported



eras
public DurationField eras()(Code)
Get the eras duration field for this chronology. DurationField or UnsupportedDurationField if unsupported



get
public int[] get(ReadablePartial partial, long instant)(Code)
Gets the values of a partial from an instant.
Parameters:
  partial - the partial instant to use
Parameters:
  instant - the instant to query the values of the partial extracted from the instant



get
public int[] get(ReadablePeriod period, long startInstant, long endInstant)(Code)
Gets the values of a period from an interval.
Parameters:
  period - the period instant to use
Parameters:
  startInstant - the start instant of an interval to query
Parameters:
  endInstant - the start instant of an interval to query the values of the period extracted from the interval



get
public int[] get(ReadablePeriod period, long duration)(Code)
Gets the values of a period from an interval.
Parameters:
  period - the period instant to use
Parameters:
  duration - the duration to query the values of the period extracted from the duration



getDateTimeMillis
public long getDateTimeMillis(int year, int monthOfYear, int dayOfMonth, int millisOfDay) throws IllegalArgumentException(Code)
Returns a datetime millisecond instant, formed from the given year, month, day, and millisecond values. The set of given values must refer to a valid datetime, or else an IllegalArgumentException is thrown.

The default implementation calls upon separate DateTimeFields to determine the result. Subclasses are encouraged to provide a more efficient implementation.
Parameters:
  year - year to use
Parameters:
  monthOfYear - month to use
Parameters:
  dayOfMonth - day of month to use
Parameters:
  millisOfDay - millisecond to use millisecond instant from 1970-01-01T00:00:00Z




getDateTimeMillis
public long getDateTimeMillis(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute, int millisOfSecond) throws IllegalArgumentException(Code)
Returns a datetime millisecond instant, formed from the given year, month, day, hour, minute, second, and millisecond values. The set of given values must refer to a valid datetime, or else an IllegalArgumentException is thrown.

The default implementation calls upon separate DateTimeFields to determine the result. Subclasses are encouraged to provide a more efficient implementation.
Parameters:
  year - year to use
Parameters:
  monthOfYear - month to use
Parameters:
  dayOfMonth - day of month to use
Parameters:
  hourOfDay - hour to use
Parameters:
  minuteOfHour - minute to use
Parameters:
  secondOfMinute - second to use
Parameters:
  millisOfSecond - millisecond to use millisecond instant from 1970-01-01T00:00:00Z




getDateTimeMillis
public long getDateTimeMillis(long instant, int hourOfDay, int minuteOfHour, int secondOfMinute, int millisOfSecond) throws IllegalArgumentException(Code)
Returns a datetime millisecond instant, from from the given instant, hour, minute, second, and millisecond values. The set of given values must refer to a valid datetime, or else an IllegalArgumentException is thrown.

The default implementation calls upon separate DateTimeFields to determine the result. Subclasses are encouraged to provide a more efficient implementation.
Parameters:
  instant - instant to start from
Parameters:
  hourOfDay - hour to use
Parameters:
  minuteOfHour - minute to use
Parameters:
  secondOfMinute - second to use
Parameters:
  millisOfSecond - millisecond to use millisecond instant from 1970-01-01T00:00:00Z




getZone
abstract public DateTimeZone getZone()(Code)
Returns the DateTimeZone that this Chronology operates in, or null if unspecified. DateTimeZone null if unspecified



halfdayOfDay
public DateTimeField halfdayOfDay()(Code)
Get the AM(0) PM(1) field for this chronology. DateTimeField or UnsupportedDateTimeField if unsupported



halfdays
public DurationField halfdays()(Code)
Get the halfdays duration field for this chronology. DurationField or UnsupportedDurationField if unsupported



hourOfDay
public DateTimeField hourOfDay()(Code)
Get the hour of day (0-23) field for this chronology. DateTimeField or UnsupportedDateTimeField if unsupported



hourOfHalfday
public DateTimeField hourOfHalfday()(Code)
Get the hour of am/pm (0-11) field for this chronology. DateTimeField or UnsupportedDateTimeField if unsupported



hours
public DurationField hours()(Code)
Get the hours duration field for this chronology. DurationField or UnsupportedDurationField if unsupported



millis
public DurationField millis()(Code)
Get the millis duration field for this chronology. DurationField or UnsupportedDurationField if unsupported



millisOfDay
public DateTimeField millisOfDay()(Code)
Get the millis of day field for this chronology. DateTimeField or UnsupportedDateTimeField if unsupported



millisOfSecond
public DateTimeField millisOfSecond()(Code)
Get the millis of second field for this chronology. DateTimeField or UnsupportedDateTimeField if unsupported



minuteOfDay
public DateTimeField minuteOfDay()(Code)
Get the minute of day field for this chronology. DateTimeField or UnsupportedDateTimeField if unsupported



minuteOfHour
public DateTimeField minuteOfHour()(Code)
Get the minute of hour field for this chronology. DateTimeField or UnsupportedDateTimeField if unsupported



minutes
public DurationField minutes()(Code)
Get the minutes duration field for this chronology. DurationField or UnsupportedDurationField if unsupported



monthOfYear
public DateTimeField monthOfYear()(Code)
Get the month of year field for this chronology. DateTimeField or UnsupportedDateTimeField if unsupported



months
public DurationField months()(Code)
Get the months duration field for this chronology. DurationField or UnsupportedDurationField if unsupported



secondOfDay
public DateTimeField secondOfDay()(Code)
Get the second of day field for this chronology. DateTimeField or UnsupportedDateTimeField if unsupported



secondOfMinute
public DateTimeField secondOfMinute()(Code)
Get the second of minute field for this chronology. DateTimeField or UnsupportedDateTimeField if unsupported



seconds
public DurationField seconds()(Code)
Get the seconds duration field for this chronology. DurationField or UnsupportedDurationField if unsupported



set
public long set(ReadablePartial partial, long instant)(Code)
Sets the partial into the instant.
Parameters:
  partial - the partial instant to use
Parameters:
  instant - the instant to update the updated instant



toString
abstract public String toString()(Code)
Gets a debugging toString. a debugging string



validate
public void validate(ReadablePartial partial, int[] values)(Code)
Validates whether the fields stored in a partial instant are valid.

This implementation uses DateTimeField.getMinimumValue(ReadablePartialint[]) and DateTimeField.getMaximumValue(ReadablePartialint[]) .
Parameters:
  partial - the partial instant to validate
Parameters:
  values - the values to validate, not null
throws:
  IllegalArgumentException - if the instant is invalid




weekOfWeekyear
public DateTimeField weekOfWeekyear()(Code)
Get the week of a week based year field for this chronology. DateTimeField or UnsupportedDateTimeField if unsupported



weeks
public DurationField weeks()(Code)
Get the weeks duration field for this chronology. DurationField or UnsupportedDurationField if unsupported



weekyear
public DateTimeField weekyear()(Code)
Get the year of a week based year field for this chronology. DateTimeField or UnsupportedDateTimeField if unsupported



weekyearOfCentury
public DateTimeField weekyearOfCentury()(Code)
Get the year of a week based year in a century field for this chronology. DateTimeField or UnsupportedDateTimeField if unsupported



weekyears
public DurationField weekyears()(Code)
Get the weekyears duration field for this chronology. DurationField or UnsupportedDurationField if unsupported



withUTC
abstract public Chronology withUTC()(Code)
Returns an instance of this Chronology that operates in the UTC time zone. Chronologies that do not operate in a time zone or are already UTC must return themself. a version of this chronology that ignores time zones



withZone
abstract public Chronology withZone(DateTimeZone zone)(Code)
Returns an instance of this Chronology that operates in any time zone. a version of this chronology with a specific time zone
Parameters:
  zone - to use, or default if null
See Also:   org.joda.time.chrono.ZonedChronology



year
public DateTimeField year()(Code)
Get the year field for this chronology. DateTimeField or UnsupportedDateTimeField if unsupported



yearOfCentury
public DateTimeField yearOfCentury()(Code)
Get the year of century field for this chronology. DateTimeField or UnsupportedDateTimeField if unsupported



yearOfEra
public DateTimeField yearOfEra()(Code)
Get the year of era field for this chronology. DateTimeField or UnsupportedDateTimeField if unsupported



years
public DurationField years()(Code)
Get the years duration field for this chronology. DurationField or UnsupportedDurationField if unsupported



Methods inherited from org.joda.time.Chronology
abstract public long add(ReadablePeriod period, long instant, int scalar)(Code)(Java Doc)
abstract public long add(long instant, long duration, int scalar)(Code)(Java Doc)
abstract public DurationField centuries()(Code)(Java Doc)
abstract public DateTimeField centuryOfEra()(Code)(Java Doc)
abstract public DateTimeField clockhourOfDay()(Code)(Java Doc)
abstract public DateTimeField clockhourOfHalfday()(Code)(Java Doc)
abstract public DateTimeField dayOfMonth()(Code)(Java Doc)
abstract public DateTimeField dayOfWeek()(Code)(Java Doc)
abstract public DateTimeField dayOfYear()(Code)(Java Doc)
abstract public DurationField days()(Code)(Java Doc)
abstract public DateTimeField era()(Code)(Java Doc)
abstract public DurationField eras()(Code)(Java Doc)
abstract public int[] get(ReadablePartial partial, long instant)(Code)(Java Doc)
abstract public int[] get(ReadablePeriod period, long startInstant, long endInstant)(Code)(Java Doc)
abstract public int[] get(ReadablePeriod period, long duration)(Code)(Java Doc)
public static Chronology getBuddhist()(Code)(Java Doc)
public static Chronology getBuddhist(DateTimeZone zone)(Code)(Java Doc)
public static Chronology getBuddhistUTC()(Code)(Java Doc)
public static Chronology getCoptic()(Code)(Java Doc)
public static Chronology getCoptic(DateTimeZone zone)(Code)(Java Doc)
public static Chronology getCopticUTC()(Code)(Java Doc)
abstract public long getDateTimeMillis(int year, int monthOfYear, int dayOfMonth, int millisOfDay)(Code)(Java Doc)
abstract public long getDateTimeMillis(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute, int millisOfSecond)(Code)(Java Doc)
abstract public long getDateTimeMillis(long instant, int hourOfDay, int minuteOfHour, int secondOfMinute, int millisOfSecond)(Code)(Java Doc)
public static Chronology getGJ()(Code)(Java Doc)
public static Chronology getGJ(DateTimeZone zone)(Code)(Java Doc)
public static Chronology getGJUTC()(Code)(Java Doc)
public static Chronology getGregorian()(Code)(Java Doc)
public static Chronology getGregorian(DateTimeZone zone)(Code)(Java Doc)
public static Chronology getGregorianUTC()(Code)(Java Doc)
public static Chronology getISO()(Code)(Java Doc)
public static Chronology getISO(DateTimeZone zone)(Code)(Java Doc)
public static Chronology getISOUTC()(Code)(Java Doc)
public static Chronology getJulian()(Code)(Java Doc)
public static Chronology getJulian(DateTimeZone zone)(Code)(Java Doc)
public static Chronology getJulianUTC()(Code)(Java Doc)
abstract public DateTimeZone getZone()(Code)(Java Doc)
abstract public DateTimeField halfdayOfDay()(Code)(Java Doc)
abstract public DurationField halfdays()(Code)(Java Doc)
abstract public DateTimeField hourOfDay()(Code)(Java Doc)
abstract public DateTimeField hourOfHalfday()(Code)(Java Doc)
abstract public DurationField hours()(Code)(Java Doc)
abstract public DurationField millis()(Code)(Java Doc)
abstract public DateTimeField millisOfDay()(Code)(Java Doc)
abstract public DateTimeField millisOfSecond()(Code)(Java Doc)
abstract public DateTimeField minuteOfDay()(Code)(Java Doc)
abstract public DateTimeField minuteOfHour()(Code)(Java Doc)
abstract public DurationField minutes()(Code)(Java Doc)
abstract public DateTimeField monthOfYear()(Code)(Java Doc)
abstract public DurationField months()(Code)(Java Doc)
abstract public DateTimeField secondOfDay()(Code)(Java Doc)
abstract public DateTimeField secondOfMinute()(Code)(Java Doc)
abstract public DurationField seconds()(Code)(Java Doc)
abstract public long set(ReadablePartial partial, long instant)(Code)(Java Doc)
abstract public String toString()(Code)(Java Doc)
abstract public void validate(ReadablePartial partial, int[] values)(Code)(Java Doc)
abstract public DateTimeField weekOfWeekyear()(Code)(Java Doc)
abstract public DurationField weeks()(Code)(Java Doc)
abstract public DateTimeField weekyear()(Code)(Java Doc)
abstract public DateTimeField weekyearOfCentury()(Code)(Java Doc)
abstract public DurationField weekyears()(Code)(Java Doc)
abstract public Chronology withUTC()(Code)(Java Doc)
abstract public Chronology withZone(DateTimeZone zone)(Code)(Java Doc)
abstract public DateTimeField year()(Code)(Java Doc)
abstract public DateTimeField yearOfCentury()(Code)(Java Doc)
abstract public DateTimeField yearOfEra()(Code)(Java Doc)
abstract public DurationField years()(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.