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

All known Subclasses:   org.joda.time.base.AbstractInstant,  org.joda.time.Instant,
ReadableInstant
public interface ReadableInstant extends Comparable(Code)
Defines an instant in the datetime continuum. This interface expresses the datetime as milliseconds from 1970-01-01T00:00:00Z.

The implementation of this interface may be mutable or immutable. This interface only gives access to retrieve data, never to change it.

Methods in your application should be defined using ReadableInstant as a parameter if the method only wants to read the instant without needing to know the specific datetime fields.
author:
   Stephen Colebourne
since:
   1.0





Method Summary
 intcompareTo(Object readableInstant)
     Compares this object with the specified object for ascending millisecond instant order.
 booleanequals(Object readableInstant)
     Compares this object with the specified object for equality based on the millisecond instant and the Chronology.
 intget(DateTimeFieldType type)
     Get the value of one of the fields of a datetime.
 ChronologygetChronology()
     Gets the chronology of the instant.
 longgetMillis()
     Get the value as the number of milliseconds since the epoch, 1970-01-01T00:00:00Z.
 DateTimeZonegetZone()
     Gets the time zone of the instant from the chronology.
 inthashCode()
     Gets a hash code for the instant that is compatible with the equals method.
 booleanisAfter(ReadableInstant instant)
     Is this instant after the instant passed in comparing solely by millisecond.
 booleanisBefore(ReadableInstant instant)
     Is this instant before the instant passed in comparing solely by millisecond.
 booleanisEqual(ReadableInstant instant)
     Is this instant equal to the instant passed in comparing solely by millisecond.
 booleanisSupported(DateTimeFieldType field)
     Checks whether the field type specified is supported by this implementation.
 InstanttoInstant()
     Get the value as a simple immutable Instant object.
 StringtoString()
     Get the value as a String in a recognisable ISO8601 format.



Method Detail
compareTo
int compareTo(Object readableInstant)(Code)
Compares this object with the specified object for ascending millisecond instant order. This ordering is inconsistent with equals, as it ignores the Chronology.

All ReadableInstant instances are accepted.
Parameters:
  readableInstant - a readable instant to check against negative value if this is less, 0 if equal, or positive value if greater
throws:
  NullPointerException - if the object is null
throws:
  ClassCastException - if the object type is not supported




equals
boolean equals(Object readableInstant)(Code)
Compares this object with the specified object for equality based on the millisecond instant and the Chronology. All ReadableInstant instances are accepted.

To compare two instants for absolute time (ie. UTC milliseconds ignoring the chronology), use ReadableInstant.isEqual(ReadableInstant) or ReadableInstant.compareTo(Object) .
Parameters:
  readableInstant - a readable instant to check against true if millisecond and chronology are equal, false ifnot or the instant is null or of an incorrect type




get
int get(DateTimeFieldType type)(Code)
Get the value of one of the fields of a datetime.

This method uses the chronology of the instant to obtain the value.
Parameters:
  type - a field type, usually obtained from DateTimeFieldType, not null the value of that field
throws:
  IllegalArgumentException - if the field type is null




getChronology
Chronology getChronology()(Code)
Gets the chronology of the instant.

The Chronology provides conversion from the millisecond value to meaningful fields in a particular calendar system. the Chronology, never null




getMillis
long getMillis()(Code)
Get the value as the number of milliseconds since the epoch, 1970-01-01T00:00:00Z. the value as milliseconds



getZone
DateTimeZone getZone()(Code)
Gets the time zone of the instant from the chronology. the DateTimeZone that the instant is using, never null



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

The formula used must be as follows:

 ((int) (getMillis() ^ (getMillis() >>> 32))) +
 (getChronology().hashCode())
 
a hash code as defined above



isAfter
boolean isAfter(ReadableInstant instant)(Code)
Is this instant after the instant passed in comparing solely by millisecond.
Parameters:
  instant - an instant to check against, null means now true if the instant is after the instant passed in



isBefore
boolean isBefore(ReadableInstant instant)(Code)
Is this instant before the instant passed in comparing solely by millisecond.
Parameters:
  instant - an instant to check against, null means now true if the instant is before the instant passed in



isEqual
boolean isEqual(ReadableInstant instant)(Code)
Is this instant equal to the instant passed in comparing solely by millisecond.
Parameters:
  instant - an instant to check against, null means now true if the instant is equal to the instant passed in



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



toInstant
Instant toInstant()(Code)
Get the value as a simple immutable Instant object.

This can be useful if you don't trust the implementation of the interface to be well-behaved, or to get a guaranteed immutable object. the value as an Instant object




toString
String toString()(Code)
Get the value as a String in a recognisable ISO8601 format.

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.