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


java.lang.Object
   org.joda.time.field.AbstractReadableInstantFieldProperty

AbstractReadableInstantFieldProperty
abstract public class AbstractReadableInstantFieldProperty implements Serializable(Code)
AbstractReadableInstantFieldProperty is a base class for binding a ReadableInstant to a DateTimeField.

It allows the date and time manipulation code to be field based yet still easy to use.

AbstractReadableInstantFieldProperty itself is thread-safe and immutable, but the ReadableInstant being operated on may be mutable and not thread-safe.
author:
   Stephen Colebourne
author:
   Brian S O'Neill
author:
   Mike Schrag
since:
   1.0




Constructor Summary
public  AbstractReadableInstantFieldProperty()
     Constructor.

Method Summary
public  intcompareTo(ReadableInstant instant)
     Compare this field to the same field on another instant.

The comparison is based on the value of the same field type, irrespective of any difference in chronology.

public  intcompareTo(ReadablePartial partial)
     Compare this field to the same field on another partial instant.

The comparison is based on the value of the same field type, irrespective of any difference in chronology.

public  booleanequals(Object object)
     Compares this property to another.
public  intget()
     Gets the value of this property from the instant.
public  StringgetAsShortText()
     Gets the short textual value of this property from the instant as a string in the default locale.
public  StringgetAsShortText(Locale locale)
     Gets the short textual value of this property from the instant as a string in the specified locale.
public  StringgetAsString()
     Gets the value of this property from the instant as a string.

This method returns the value converted to a String using Integer.toString.

public  StringgetAsText()
     Gets the textual value of this property from the instant as a string in the default locale.
public  StringgetAsText(Locale locale)
     Gets the textual value of this property from the instant as a string in the specified locale.
protected  ChronologygetChronology()
     Gets the chronology of the datetime that this property is linked to.
public  intgetDifference(ReadableInstant instant)
     Returns the difference between this field property instant and the one passed in, in the units of this field.
public  longgetDifferenceAsLong(ReadableInstant instant)
     Returns the difference between this field property instant and the one passed in, in the units of this field.
public  DurationFieldgetDurationField()
     Returns the duration per unit value of this field.
abstract public  DateTimeFieldgetField()
     Gets the field being used.
public  DateTimeFieldTypegetFieldType()
     Gets the field type being used.
public  intgetLeapAmount()
     Gets the amount by which this field is leap.
public  DurationFieldgetLeapDurationField()
     If this field were to leap, then it would be in units described by the returned duration.
public  intgetMaximumShortTextLength(Locale locale)
     Gets the maximum short text length for the field.
public  intgetMaximumTextLength(Locale locale)
     Gets the maximum text length for the field.
public  intgetMaximumValue()
     Gets the maximum value for the field.
public  intgetMaximumValueOverall()
     Gets the maximum value for the field ignoring the current time.
abstract protected  longgetMillis()
     Gets the milliseconds of the datetime that this property is linked to.
public  intgetMinimumValue()
     Gets the minimum value for the field.
public  intgetMinimumValueOverall()
     Gets the minimum value for the field ignoring the current time.
public  StringgetName()
     Gets the name of the field.
public  DurationFieldgetRangeDurationField()
     Returns the range duration of this field.
public  inthashCode()
     Returns a hashcode compatible with the equals method.
public  booleanisLeap()
     Gets whether this field is leap.
public  longremainder()
     Returns the fractional duration milliseconds of this field.
public  IntervaltoInterval()
     Returns the interval that represents the range of the minimum and maximum values of this field.
public  StringtoString()
     Output a debugging string.


Constructor Detail
AbstractReadableInstantFieldProperty
public AbstractReadableInstantFieldProperty()(Code)
Constructor.




Method Detail
compareTo
public int compareTo(ReadableInstant instant)(Code)
Compare this field to the same field on another instant.

The comparison is based on the value of the same field type, irrespective of any difference in chronology. Thus, if this property represents the hourOfDay field, then the hourOfDay field of the other instant will be queried whether in the same chronology or not.
Parameters:
  instant - the instant to compare to negative value if this is less, 0 if equal, or positive value if greater
throws:
  IllegalArgumentException - if the instant is null




compareTo
public int compareTo(ReadablePartial partial)(Code)
Compare this field to the same field on another partial instant.

The comparison is based on the value of the same field type, irrespective of any difference in chronology. Thus, if this property represents the hourOfDay field, then the hourOfDay field of the other partial will be queried whether in the same chronology or not.
Parameters:
  partial - the partial to compare to negative value if this is less, 0 if equal, or positive value if greater
throws:
  IllegalArgumentException - if the partial is null
throws:
  IllegalArgumentException - if the partial doesn't support this field




equals
public boolean equals(Object object)(Code)
Compares this property to another.
Parameters:
  object - the object to compare to true if equal



get
public int get()(Code)
Gets the value of this property from the instant.

For example, the following two lines of code are equivalent:

 datetime.getDayOfMonth();
 datetime.dayOfMonth().get();
 
the current value
See Also:   DateTimeField.get



getAsShortText
public String getAsShortText()(Code)
Gets the short textual value of this property from the instant as a string in the default locale.

This method returns the value converted to a String returning the appropriate textual description wherever possible. Thus, a day of week of 1 would return 'Mon' in English. the current text value
See Also:   DateTimeField.getAsShortText




getAsShortText
public String getAsShortText(Locale locale)(Code)
Gets the short textual value of this property from the instant as a string in the specified locale.

This method returns the value converted to a String returning the appropriate textual description wherever possible. Thus, a day of week of 1 would return 'Mon' in English.
Parameters:
  locale - locale to use for selecting a text symbol, null means default the current text value
See Also:   DateTimeField.getAsShortText




getAsString
public String getAsString()(Code)
Gets the value of this property from the instant as a string.

This method returns the value converted to a String using Integer.toString. This method does NOT return textual descriptions such as 'Monday' or 'January'. See AbstractReadableInstantFieldProperty.getAsText() and AbstractReadableInstantFieldProperty.getAsShortText() for those. the current value
See Also:   DateTimeField.get
since:
   1.1




getAsText
public String getAsText()(Code)
Gets the textual value of this property from the instant as a string in the default locale.

This method returns the value converted to a String returning the appropriate textual description wherever possible. Thus, a day of week of 1 would return 'Monday' in English. the current text value
See Also:   DateTimeField.getAsText




getAsText
public String getAsText(Locale locale)(Code)
Gets the textual value of this property from the instant as a string in the specified locale.

This method returns the value converted to a String returning the appropriate textual description wherever possible. Thus, a day of week of 1 would return 'Monday' in English.
Parameters:
  locale - locale to use for selecting a text symbol, null means default the current text value
See Also:   DateTimeField.getAsText




getChronology
protected Chronology getChronology()(Code)
Gets the chronology of the datetime that this property is linked to.

This implementation throws UnsupportedOperationException, and must be implemented by subclasses to enable the equals() and hashCode() methods. the chronology
since:
   1.4




getDifference
public int getDifference(ReadableInstant instant)(Code)
Returns the difference between this field property instant and the one passed in, in the units of this field. The sign of the difference matches that of compareTo. In other words, this field property's instant is the minuend.
Parameters:
  instant - the subtrahend, null means now the difference in the units of this field
See Also:   DateTimeField.getDifference



getDifferenceAsLong
public long getDifferenceAsLong(ReadableInstant instant)(Code)
Returns the difference between this field property instant and the one passed in, in the units of this field. The sign of the difference matches that of compareTo. In other words, this field property's instant is the minuend.
Parameters:
  instant - the subtrahend, null means now the difference in the units of this field
See Also:   DateTimeField.getDifference



getDurationField
public DurationField getDurationField()(Code)
Returns the duration per unit value of this field. For example, if this field represents "hour of day", then the duration is an hour. the duration of this field, or UnsupportedDurationField



getField
abstract public DateTimeField getField()(Code)
Gets the field being used. the field



getFieldType
public DateTimeFieldType getFieldType()(Code)
Gets the field type being used. the field type



getLeapAmount
public int getLeapAmount()(Code)
Gets the amount by which this field is leap. the amount by which the field is leap
See Also:   DateTimeField.getLeapAmount



getLeapDurationField
public DurationField getLeapDurationField()(Code)
If this field were to leap, then it would be in units described by the returned duration. If this field doesn't ever leap, null is returned.



getMaximumShortTextLength
public int getMaximumShortTextLength(Locale locale)(Code)
Gets the maximum short text length for the field.
Parameters:
  locale - optional locale to use for selecting a text symbol the maximum length
See Also:   DateTimeField.getMaximumShortTextLength



getMaximumTextLength
public int getMaximumTextLength(Locale locale)(Code)
Gets the maximum text length for the field.
Parameters:
  locale - optional locale to use for selecting a text symbol the maximum length
See Also:   DateTimeField.getMaximumTextLength



getMaximumValue
public int getMaximumValue()(Code)
Gets the maximum value for the field. the maximum value
See Also:   DateTimeField.getMaximumValue



getMaximumValueOverall
public int getMaximumValueOverall()(Code)
Gets the maximum value for the field ignoring the current time. the maximum value
See Also:   DateTimeField.getMaximumValue



getMillis
abstract protected long getMillis()(Code)
Gets the milliseconds of the datetime that this property is linked to. the milliseconds



getMinimumValue
public int getMinimumValue()(Code)
Gets the minimum value for the field. the minimum value
See Also:   DateTimeField.getMinimumValue



getMinimumValueOverall
public int getMinimumValueOverall()(Code)
Gets the minimum value for the field ignoring the current time. the minimum value
See Also:   DateTimeField.getMinimumValue



getName
public String getName()(Code)
Gets the name of the field. the field name



getRangeDurationField
public DurationField getRangeDurationField()(Code)
Returns the range duration of this field. For example, if this field represents "hour of day", then the range duration is a day. the range duration of this field, or null if field has no range



hashCode
public int hashCode()(Code)
Returns a hashcode compatible with the equals method. the hashcode



isLeap
public boolean isLeap()(Code)
Gets whether this field is leap. true if a leap field
See Also:   DateTimeField.isLeap



remainder
public long remainder()(Code)
Returns the fractional duration milliseconds of this field.
See Also:   DateTimeField.remainder remainder duration, in milliseconds



toInterval
public Interval toInterval()(Code)
Returns the interval that represents the range of the minimum and maximum values of this field.

For example, datetime.monthOfYear().toInterval() will return an interval over the whole month. the interval of this field
since:
   1.2




toString
public String toString()(Code)
Output a debugging string. debugging string



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.