|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface GDateSpecification
Represents an XML Schema-compatible Gregorian date.
Both the immutable GDate and the mutable GDateBuilder are GDateSpecifications. Use this interface where you want to allow callers to pass any implementation of a GDate.
GDate
,
XmlCalendar
Field Summary | |
---|---|
static int |
HAS_DAY
Day of month is specified. |
static int |
HAS_MONTH
Month of year is specified. |
static int |
HAS_TIME
Time of day is specified. |
static int |
HAS_TIMEZONE
Timezone is specified. |
static int |
HAS_YEAR
Year is specified. |
Method Summary | |
---|---|
java.lang.String |
canonicalString()
The canonical string representation. |
int |
compareToGDate(GDateSpecification gdatespec)
Comparison to another GDate. |
int |
getBuiltinTypeCode()
Returns the builtin type code for the shape of the information contained in this instance, or 0 if the instance doesn't contain information corresponding to a Schema type. |
XmlCalendar |
getCalendar()
Retrieves the value of the current time as an XmlCalendar . |
java.util.Date |
getDate()
Retrieves the value of the current time as a java.util.Date instance. |
int |
getDay()
Gets the day-of-month. |
int |
getFlags()
Returns a combination of flags indicating the information contained by this GDate. |
java.math.BigDecimal |
getFraction()
Gets the fraction-of-second. |
int |
getHour()
Gets the hour-of-day. |
int |
getJulianDate()
Returns the Julian date corresponding to this Gregorian date. |
int |
getMillisecond()
Gets the rounded millisecond value. |
int |
getMinute()
Gets the minute-of-hour. |
int |
getMonth()
Gets the month-of-year. |
int |
getSecond()
Gets the second-of-minute. |
int |
getTimeZoneHour()
Gets the time zone hour. |
int |
getTimeZoneMinute()
Gets the time zone minutes. |
int |
getTimeZoneSign()
Gets the time zone sign. |
int |
getYear()
Gets the year. |
boolean |
hasDate()
True if this date/time specification specifies a full date (year, month, day) |
boolean |
hasDay()
True if this date/time specification specifies a day-of-month. |
boolean |
hasMonth()
True if this date/time specification specifies a month-of-year. |
boolean |
hasTime()
True if this date/time specification specifies a time-of-day. |
boolean |
hasTimeZone()
True if this date/time specification specifies a timezone. |
boolean |
hasYear()
True if this date/time specification specifies a year. |
boolean |
isImmutable()
True if this GDate specification is immutable. |
boolean |
isValid()
True if this GDate corresponds to a valid gregorian date value in XML schema. |
java.lang.String |
toString()
The natural string representation. |
Field Detail |
---|
static final int HAS_TIMEZONE
getFlags()
.
static final int HAS_YEAR
getFlags()
.
static final int HAS_MONTH
getFlags()
.
static final int HAS_DAY
getFlags()
.
static final int HAS_TIME
getFlags()
.
Method Detail |
---|
int getFlags()
HAS_TIMEZONE
, HAS_YEAR
, HAS_MONTH
,
HAS_DAY
, and HAS_TIME
.
boolean isImmutable()
boolean isValid()
boolean hasTimeZone()
boolean hasYear()
boolean hasMonth()
boolean hasDay()
boolean hasTime()
boolean hasDate()
int getYear()
int getMonth()
int getDay()
int getHour()
int getMinute()
int getSecond()
int getTimeZoneSign()
int getTimeZoneHour()
int getTimeZoneMinute()
java.math.BigDecimal getFraction()
int getMillisecond()
int getJulianDate()
XmlCalendar getCalendar()
XmlCalendar
.
XmlCalendar
is a subclass of GregorianCalendar
which is slightly customized to match XML schema date rules.
The returned XmlCalendar
has only those time and date fields
set that are reflected in the GDate object. Because of the way the
Calendar
contract works, any information in the isSet() vanishes
as soon as you view any unset field using get() methods.
This means that if it is important to understand which date fields
are set, you must call isSet() first before get().
java.util.Date getDate()
int compareToGDate(GDateSpecification gdatespec)
gdatespec
- the date to compare against.int getBuiltinTypeCode()
Value will be equal to
SchemaType.BTC_NOT_BUILTIN
,
SchemaType.BTC_G_YEAR
,
SchemaType.BTC_G_YEAR_MONTH
,
SchemaType.BTC_G_MONTH
,
SchemaType.BTC_G_MONTH_DAY
,
SchemaType.BTC_G_DAY
,
SchemaType.BTC_DATE
,
SchemaType.BTC_DATE_TIME
, or
SchemaType.BTC_TIME
.
java.lang.String canonicalString()
java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |