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


org.joda.time.ReadWritableInstant

ReadWritableInstant
public interface ReadWritableInstant extends ReadableInstant(Code)
Defines an instant in the datetime continuum that can be queried and modified. This interface expresses the datetime as milliseconds from 1970-01-01T00:00:00Z.

The implementation of this interface will be mutable. It may provide more advanced methods than those in the interface.
author:
   Stephen Colebourne
since:
   1.0





Method Summary
 voidadd(long duration)
     Adds a millisecond duration to this instant.
 voidadd(ReadableDuration duration)
     Adds a duration to this instant.
 voidadd(ReadableDuration duration, int scalar)
     Adds a duration to this instant specifying how many times to add.
 voidadd(ReadablePeriod period)
     Adds a period to this instant.
 voidadd(ReadablePeriod period, int scalar)
     Adds a period to this instant specifying how many times to add.
 voidadd(DurationFieldType type, int amount)
     Adds to the instant specifying the duration and multiple to add.
 voidset(DateTimeFieldType type, int value)
     Sets the value of one of the fields of the instant, such as hourOfDay.
 voidsetChronology(Chronology chronology)
     Sets the chronology of the datetime, which has no effect if not applicable.
 voidsetMillis(long instant)
     Sets the value as the number of milliseconds since the epoch, 1970-01-01T00:00:00Z.
 voidsetMillis(ReadableInstant instant)
     Sets the millisecond instant of this instant from another.
 voidsetZone(DateTimeZone zone)
     Sets the time zone of the datetime, changing the chronology and field values.

Changing the zone using this method retains the millisecond instant. The millisecond instant is adjusted in the new zone to compensate. chronology.

 voidsetZoneRetainFields(DateTimeZone zone)
     Sets the time zone of the datetime, changing the chronology and millisecond.



Method Detail
add
void add(long duration)(Code)
Adds a millisecond duration to this instant.

This will typically change the value of ost fields.
Parameters:
  duration - the millis to add
throws:
  IllegalArgumentException - if the value is invalid




add
void add(ReadableDuration duration)(Code)
Adds a duration to this instant.

This will typically change the value of most fields.
Parameters:
  duration - the duration to add, null means add zero
throws:
  ArithmeticException - if the result exceeds the capacity of the instant




add
void add(ReadableDuration duration, int scalar)(Code)
Adds a duration to this instant specifying how many times to add.

This will typically change the value of most fields.
Parameters:
  duration - the duration to add, null means add zero
Parameters:
  scalar - direction and amount to add, which may be negative
throws:
  ArithmeticException - if the result exceeds the capacity of the instant




add
void add(ReadablePeriod period)(Code)
Adds a period to this instant.

This will typically change the value of most fields.
Parameters:
  period - the period to add, null means add zero
throws:
  ArithmeticException - if the result exceeds the capacity of the instant




add
void add(ReadablePeriod period, int scalar)(Code)
Adds a period to this instant specifying how many times to add.

This will typically change the value of most fields.
Parameters:
  period - the period to add, null means add zero
Parameters:
  scalar - direction and amount to add, which may be negative
throws:
  ArithmeticException - if the result exceeds the capacity of the instant




add
void add(DurationFieldType type, int amount)(Code)
Adds to the instant specifying the duration and multiple to add.
Parameters:
  type - a field type, usually obtained from DateTimeFieldType, null ignored
Parameters:
  amount - the amount to add of this duration
throws:
  ArithmeticException - if the result exceeds the capacity of the instant



set
void set(DateTimeFieldType type, int value)(Code)
Sets the value of one of the fields of the instant, such as hourOfDay.
Parameters:
  type - a field type, usually obtained from DateTimeFieldType, null ignored
Parameters:
  value - the value to set the field to
throws:
  IllegalArgumentException - if the value is invalid



setChronology
void setChronology(Chronology chronology)(Code)
Sets the chronology of the datetime, which has no effect if not applicable.
Parameters:
  chronology - the chronology to use, null means ISOChronology in default zone
throws:
  IllegalArgumentException - if the value is invalid



setMillis
void setMillis(long instant)(Code)
Sets the value as the number of milliseconds since the epoch, 1970-01-01T00:00:00Z.
Parameters:
  instant - the milliseconds since 1970-01-01T00:00:00Z to set theinstant to
throws:
  IllegalArgumentException - if the value is invalid



setMillis
void setMillis(ReadableInstant instant)(Code)
Sets the millisecond instant of this instant from another.

This method does not change the chronology of this instant, just the millisecond instant.
Parameters:
  instant - the instant to use, null means now




setZone
void setZone(DateTimeZone zone)(Code)
Sets the time zone of the datetime, changing the chronology and field values.

Changing the zone using this method retains the millisecond instant. The millisecond instant is adjusted in the new zone to compensate. chronology. Setting the time zone does not affect the millisecond value of this instant.

If the chronology already has this time zone, no change occurs.
Parameters:
  zone - the time zone to use, null means default zone
See Also:   ReadWritableInstant.setZoneRetainFields




setZoneRetainFields
void setZoneRetainFields(DateTimeZone zone)(Code)
Sets the time zone of the datetime, changing the chronology and millisecond.

Changing the zone using this method retains the field values. The millisecond instant is adjusted in the new zone to compensate.

If the chronology already has this time zone, no change occurs.
Parameters:
  zone - the time zone to use, null means default zone
See Also:   ReadWritableInstant.setZone




www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.