Java Doc for ReadWritablePeriod.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.ReadWritablePeriod

All known Subclasses:   org.joda.time.MutablePeriod,
ReadWritablePeriod
public interface ReadWritablePeriod extends ReadablePeriod(Code)
Defines a duration of time that can be queried and modified using datetime fields.

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





Method Summary
 voidadd(DurationFieldType field, int value)
     Adds to the value of one of the fields.
 voidadd(ReadablePeriod period)
     Adds a period to this one by adding each field in turn.
 voidadd(int years, int months, int weeks, int days, int hours, int minutes, int seconds, int millis)
     Adds to each field of this period.
 voidadd(ReadableInterval interval)
     Adds an interval to this one by dividing the interval into fields and then adding each field in turn.
 voidaddDays(int days)
     Adds the specified days to the number of days in the period.
 voidaddHours(int hours)
     Adds the specified hours to the number of hours in the period.
 voidaddMillis(int millis)
     Adds the specified millis to the number of millis in the period.
 voidaddMinutes(int minutes)
     Adds the specified minutes to the number of minutes in the period.
 voidaddMonths(int months)
     Adds the specified months to the number of months in the period.
 voidaddSeconds(int seconds)
     Adds the specified seconds to the number of seconds in the period.
 voidaddWeeks(int weeks)
     Adds the specified weeks to the number of weeks in the period.
 voidaddYears(int years)
     Adds the specified years to the number of years in the period.
 voidclear()
     Clears the period, setting all values back to zero.
 voidset(DurationFieldType field, int value)
     Sets the value of one of the fields.
 voidsetDays(int days)
     Sets the number of days of the period.
 voidsetHours(int hours)
     Sets the number of hours of the period.
 voidsetMillis(int millis)
     Sets the number of millis of the period.
 voidsetMinutes(int minutes)
     Sets the number of minutes of the period.
 voidsetMonths(int months)
     Sets the number of months of the period.
 voidsetPeriod(ReadablePeriod period)
     Sets all the fields in one go from another ReadablePeriod.
 voidsetPeriod(int years, int months, int weeks, int days, int hours, int minutes, int seconds, int millis)
     Sets all the fields in one go.
 voidsetPeriod(ReadableInterval interval)
     Sets all the fields in one go from an interval dividing the fields using the period type.
 voidsetSeconds(int seconds)
     Sets the number of seconds of the period.
 voidsetValue(int index, int value)
     Sets the value of one of the fields by index.
 voidsetWeeks(int weeks)
     Sets the number of weeks of the period.
 voidsetYears(int years)
     Sets the number of years of the period.



Method Detail
add
void add(DurationFieldType field, int value)(Code)
Adds to the value of one of the fields.

The field type specified must be one of those that is supported by the period.
Parameters:
  field - a DurationFieldType instance that is supported by this period
Parameters:
  value - the value to add to the field
throws:
  IllegalArgumentException - if the field is null or not supported




add
void add(ReadablePeriod period)(Code)
Adds a period to this one by adding each field in turn.
Parameters:
  period - the period to add, null means add nothing
throws:
  IllegalArgumentException - if the period being added contains a fieldnot supported by this period
throws:
  ArithmeticException - if the addition exceeds the capacity of the period



add
void add(int years, int months, int weeks, int days, int hours, int minutes, int seconds, int millis)(Code)
Adds to each field of this period.
Parameters:
  years - amount of years to add to this period, which must be zero if unsupported
Parameters:
  months - amount of months to add to this period, which must be zero if unsupported
Parameters:
  weeks - amount of weeks to add to this period, which must be zero if unsupported
Parameters:
  days - amount of days to add to this period, which must be zero if unsupported
Parameters:
  hours - amount of hours to add to this period, which must be zero if unsupported
Parameters:
  minutes - amount of minutes to add to this period, which must be zero if unsupported
Parameters:
  seconds - amount of seconds to add to this period, which must be zero if unsupported
Parameters:
  millis - amount of milliseconds to add to this period, which must be zero if unsupported
throws:
  IllegalArgumentException - if the period being added contains a fieldnot supported by this period
throws:
  ArithmeticException - if the addition exceeds the capacity of the period



add
void add(ReadableInterval interval)(Code)
Adds an interval to this one by dividing the interval into fields and then adding each field in turn.
Parameters:
  interval - the interval to add, null means add nothing
throws:
  ArithmeticException - if the addition exceeds the capacity of the period



addDays
void addDays(int days)(Code)
Adds the specified days to the number of days in the period.
Parameters:
  days - the number of days
throws:
  IllegalArgumentException - if field is not supported and the value is non-zero
throws:
  ArithmeticException - if the addition exceeds the capacity of the period



addHours
void addHours(int hours)(Code)
Adds the specified hours to the number of hours in the period.
Parameters:
  hours - the number of hours
throws:
  IllegalArgumentException - if field is not supported and the value is non-zero
throws:
  ArithmeticException - if the addition exceeds the capacity of the period



addMillis
void addMillis(int millis)(Code)
Adds the specified millis to the number of millis in the period.
Parameters:
  millis - the number of millis
throws:
  IllegalArgumentException - if field is not supported and the value is non-zero
throws:
  ArithmeticException - if the addition exceeds the capacity of the period



addMinutes
void addMinutes(int minutes)(Code)
Adds the specified minutes to the number of minutes in the period.
Parameters:
  minutes - the number of minutes
throws:
  IllegalArgumentException - if field is not supported and the value is non-zero
throws:
  ArithmeticException - if the addition exceeds the capacity of the period



addMonths
void addMonths(int months)(Code)
Adds the specified months to the number of months in the period.
Parameters:
  months - the number of months
throws:
  IllegalArgumentException - if field is not supported and the value is non-zero
throws:
  ArithmeticException - if the addition exceeds the capacity of the period



addSeconds
void addSeconds(int seconds)(Code)
Adds the specified seconds to the number of seconds in the period.
Parameters:
  seconds - the number of seconds
throws:
  IllegalArgumentException - if field is not supported and the value is non-zero
throws:
  ArithmeticException - if the addition exceeds the capacity of the period



addWeeks
void addWeeks(int weeks)(Code)
Adds the specified weeks to the number of weeks in the period.
Parameters:
  weeks - the number of weeks
throws:
  IllegalArgumentException - if field is not supported and the value is non-zero
throws:
  ArithmeticException - if the addition exceeds the capacity of the period



addYears
void addYears(int years)(Code)
Adds the specified years to the number of years in the period.
Parameters:
  years - the number of years
throws:
  IllegalArgumentException - if field is not supported and the value is non-zero
throws:
  ArithmeticException - if the addition exceeds the capacity of the period



clear
void clear()(Code)
Clears the period, setting all values back to zero.



set
void set(DurationFieldType field, int value)(Code)
Sets the value of one of the fields.

The field type specified must be one of those that is supported by the period.
Parameters:
  field - a DurationFieldType instance that is supported by this period
Parameters:
  value - the new value for the field
throws:
  IllegalArgumentException - if the field is null or not supported




setDays
void setDays(int days)(Code)
Sets the number of days of the period.
Parameters:
  days - the number of days
throws:
  IllegalArgumentException - if field is not supported and the value is non-zero



setHours
void setHours(int hours)(Code)
Sets the number of hours of the period.
Parameters:
  hours - the number of hours
throws:
  IllegalArgumentException - if field is not supported and the value is non-zero



setMillis
void setMillis(int millis)(Code)
Sets the number of millis of the period.
Parameters:
  millis - the number of millis
throws:
  IllegalArgumentException - if field is not supported and the value is non-zero



setMinutes
void setMinutes(int minutes)(Code)
Sets the number of minutes of the period.
Parameters:
  minutes - the number of minutes
throws:
  IllegalArgumentException - if field is not supported and the value is non-zero



setMonths
void setMonths(int months)(Code)
Sets the number of months of the period.
Parameters:
  months - the number of months
throws:
  IllegalArgumentException - if field is not supported and the value is non-zero



setPeriod
void setPeriod(ReadablePeriod period)(Code)
Sets all the fields in one go from another ReadablePeriod.
Parameters:
  period - the period to set, null means zero length period
throws:
  IllegalArgumentException - if an unsupported field's value is non-zero



setPeriod
void setPeriod(int years, int months, int weeks, int days, int hours, int minutes, int seconds, int millis)(Code)
Sets all the fields in one go.
Parameters:
  years - amount of years in this period, which must be zero if unsupported
Parameters:
  months - amount of months in this period, which must be zero if unsupported
Parameters:
  weeks - amount of weeks in this period, which must be zero if unsupported
Parameters:
  days - amount of days in this period, which must be zero if unsupported
Parameters:
  hours - amount of hours in this period, which must be zero if unsupported
Parameters:
  minutes - amount of minutes in this period, which must be zero if unsupported
Parameters:
  seconds - amount of seconds in this period, which must be zero if unsupported
Parameters:
  millis - amount of milliseconds in this period, which must be zero if unsupported
throws:
  IllegalArgumentException - if an unsupported field's value is non-zero



setPeriod
void setPeriod(ReadableInterval interval)(Code)
Sets all the fields in one go from an interval dividing the fields using the period type.
Parameters:
  interval - the interval to set, null means zero length



setSeconds
void setSeconds(int seconds)(Code)
Sets the number of seconds of the period.
Parameters:
  seconds - the number of seconds
throws:
  IllegalArgumentException - if field is not supported and the value is non-zero



setValue
void setValue(int index, int value)(Code)
Sets the value of one of the fields by index.
Parameters:
  index - the field index
Parameters:
  value - the new value for the field
throws:
  IndexOutOfBoundsException - if the index is invalid



setWeeks
void setWeeks(int weeks)(Code)
Sets the number of weeks of the period.
Parameters:
  weeks - the number of weeks
throws:
  IllegalArgumentException - if field is not supported and the value is non-zero



setYears
void setYears(int years)(Code)
Sets the number of years of the period.
Parameters:
  years - the number of years
throws:
  IllegalArgumentException - if field is not supported and the value is non-zero



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