Joda System API

org.joda.property.type
Interface InstantProperty

All Superinterfaces:
java.lang.Comparable, DataProperty, ModelElement, Property, org.joda.time.ReadableInstant, org.joda.time.ReadWritableInstant, java.io.Serializable
All Known Subinterfaces:
DateProperty, DateTimeProperty, TimeProperty
All Known Implementing Classes:
DefaultDateProperty, DefaultDateTimeProperty, DefaultTimeProperty

public interface InstantProperty
extends DataProperty, org.joda.time.ReadWritableInstant

Interface representing an instant in the datetime continuum as a property. Typically the subinterfaces DateProperty, TimeProperty and DateTimeProperty are used instead.

Author:
Stephen Colebourne

Nested Class Summary
 
Nested classes inherited from class org.joda.property.Property
Property.Internal
 
Field Summary
static java.lang.Class DEFAULT_TYPE
           
 
Method Summary
 org.joda.time.DateTime get()
          Get the property's value as an immutable DateTime.
 java.util.Calendar toCalendar(java.util.Locale locale)
          Get the property's value as a Calendar, which is not necessarily a GregorianCalendar.
 java.util.Date toDate()
          Get the property's value as a Date.
 java.util.GregorianCalendar toGregorianCalendar()
          Get the property's value as a GregorianCalendar.
 
Methods inherited from interface org.joda.property.type.DataProperty
toDataString
 
Methods inherited from interface org.joda.property.Property
addPropertyChangeListener, bean, equals, equalsValue, firePropertyChange, getContentName, getContentType, getPropertyName, getPropertyType, hashCode, isModifiable, isNull, isReadOnly, removePropertyChangeListener, set, setModifiable, setReadOnly, toObject, toString
 
Methods inherited from interface org.joda.property.ModelElement
getAttribute, getAttributeCount, getAttributeMap, setAttribute
 
Methods inherited from interface org.joda.time.ReadWritableInstant
add, add, addMillis, addWrapped, set, setMillis, setMillis
 
Methods inherited from interface org.joda.time.ReadableInstant
compareTo, equals, get, getChronology, getDateTimeZone, getMillis, hashCode, isAfter, isBefore, isEqual, toCopy, toCopy, toInstant, toString
 

Field Detail

DEFAULT_TYPE

public static final java.lang.Class DEFAULT_TYPE
Method Detail

get

public org.joda.time.DateTime get()
Get the property's value as an immutable DateTime.

Returns:
the property value as an immutable DateTime

toCalendar

public java.util.Calendar toCalendar(java.util.Locale locale)
Get the property's value as a Calendar, which is not necessarily a GregorianCalendar.

Changing the returned value will not affect the property.

Returns:
the property value as a Calendar

toGregorianCalendar

public java.util.GregorianCalendar toGregorianCalendar()
Get the property's value as a GregorianCalendar.

Changing the returned value will not affect the property.

Returns:
the property value as a GregorianCalendar

toDate

public java.util.Date toDate()
Get the property's value as a Date.

Changing the returned value will not affect the property.

Returns:
the property value as a Date

Joda System API

Copyright © 2001-2003 Stephen Colebourne. All Rights Reserved.