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

All known Subclasses:   org.joda.time.TimeOfDay,  org.joda.time.Partial,  org.joda.time.LocalTime,  org.joda.time.LocalDate,  org.joda.time.YearMonthDay,  org.joda.time.base.AbstractPartial,  org.joda.time.base.BasePartial,  org.joda.time.LocalDateTime,  org.joda.time.MockPartial,
ReadablePartial
public interface ReadablePartial (Code)
Defines a partial time that does not support every datetime field, and is thus a local time.

A ReadablePartial supports a subset of those fields on the chronology. It cannot be compared to a ReadableInstant, as it does not fully specify an instant in time. The time it does specify is a local time, and does not include a time zone.

A ReadablePartial can be converted to a ReadableInstant using the toDateTime method. This works by providing a full base instant that can be used to 'fill in the gaps' and specify a time zone.
author:
   Stephen Colebourne
since:
   1.0





Method Summary
 booleanequals(Object partial)
     Compares this partial with the specified object for equality based on the supported fields, chronology and values.
 intget(DateTimeFieldType field)
     Gets the value of one of the fields.
 ChronologygetChronology()
     Gets the chronology of the partial which is never null.
 DateTimeFieldgetField(int index)
     Gets the field at the specified index.
 DateTimeFieldTypegetFieldType(int index)
     Gets the field type at the specified index.
 intgetValue(int index)
     Gets the value at the specified index.
 inthashCode()
     Gets a hash code for the partial that is compatible with the equals method.
 booleanisSupported(DateTimeFieldType field)
     Checks whether the field type specified is supported by this partial.
 intsize()
     Gets the number of fields that this partial supports.
 DateTimetoDateTime(ReadableInstant baseInstant)
     Converts this partial to a full datetime by resolving it against another datetime.

This method takes the specified datetime and sets the fields from this instant on top.

 StringtoString()
     Get the value as a String in a recognisable ISO8601 format, only displaying supported fields.



Method Detail
equals
boolean equals(Object partial)(Code)
Compares this partial with the specified object for equality based on the supported fields, chronology and values.

Two instances of ReadablePartial are equal if they have the same chronology, same field types (in same order) and same values.
Parameters:
  partial - the object to compare to true if equal




get
int get(DateTimeFieldType field)(Code)
Gets the value of one of the fields.

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




getChronology
Chronology getChronology()(Code)
Gets the chronology of the partial which is never null.

The Chronology is the calculation engine behind the partial and provides conversion and validation of the fields in a particular calendar system. the chronology, never null




getField
DateTimeField getField(int index)(Code)
Gets the field at the specified index.
Parameters:
  index - the index to retrieve the field at the specified index
throws:
  IndexOutOfBoundsException - if the index is invalid



getFieldType
DateTimeFieldType getFieldType(int index)(Code)
Gets the field type at the specified index.
Parameters:
  index - the index to retrieve the field at the specified index
throws:
  IndexOutOfBoundsException - if the index is invalid



getValue
int getValue(int index)(Code)
Gets the value at the specified index.
Parameters:
  index - the index to retrieve the value of the field at the specified index
throws:
  IndexOutOfBoundsException - if the index is invalid



hashCode
int hashCode()(Code)
Gets a hash code for the partial that is compatible with the equals method.

The formula used must be:

 int total = 157;
 for (int i = 0; i < fields.length; i++) {
 total = 23 * total + values[i];
 total = 23 * total + fieldTypes[i].hashCode();
 }
 total += chronology.hashCode();
 return total;
 
a suitable hash code



isSupported
boolean isSupported(DateTimeFieldType field)(Code)
Checks whether the field type specified is supported by this partial.
Parameters:
  field - the field to check, may be null which returns false true if the field is supported



size
int size()(Code)
Gets the number of fields that this partial supports. the number of fields supported



toDateTime
DateTime toDateTime(ReadableInstant baseInstant)(Code)
Converts this partial to a full datetime by resolving it against another datetime.

This method takes the specified datetime and sets the fields from this instant on top. The chronology from the base instant is used.

For example, if this partial represents a time, then the result of this method will be the datetime from the specified base instant plus the time from this partial.
Parameters:
  baseInstant - the instant that provides the missing fields, null means now the combined datetime




toString
String toString()(Code)
Get the value as a String in a recognisable ISO8601 format, only displaying supported fields.

The string output is in ISO8601 format to enable the String constructor to correctly parse it. the value as an ISO8601 string




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