Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.exolab.castor.types.DateTimeBase
org.exolab.castor.types.GDay
public class GDay
extends DateTimeBase
Field Summary |
Fields inherited from class org.exolab.castor.types.DateTimeBase | |
EQUALS , GREATER_THAN , INDETERMINATE , LESS_THAN , MAX_TIME_ZONE_COMPARISON_OFFSET , WRONGLY_PLACED |
Constructor Summary | |
| |
| |
| |
|
Method Summary | |
short | |
short |
|
short |
|
short | |
short |
|
short | |
short[] |
|
short |
|
boolean | |
boolean |
|
boolean | |
boolean |
|
boolean | |
boolean |
|
boolean | |
boolean |
|
boolean | |
static Object |
|
static GDay |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void | |
void |
|
void | |
void |
|
java.util.Date |
|
String |
|
Methods inherited from class org.exolab.castor.types.DateTimeBase | |
addDuration , appendDateString , appendTimeString , appendTimeZoneString , clone , compareTo , equal , equals , getCentury , getDay , getHour , getMilli , getMinute , getMonth , getSeconds , getValues , getYear , getZoneHour , getZoneMinute , hasCentury , hasDay , hasHour , hasIsNegative , hasMilli , hasMinute , hasMonth , hasSeconds , hasYear , hashCode , isLeap , isNegative , isUTC , isZoneNegative , normalize , parseDay , parseMonth , parseTime , parseTimeZone , parseYear , setCentury , setDateFormatTimeZone , setDateFormatTimeZone , setDay , setHour , setMilliSecond , setMinute , setMonth , setNegative , setSecond , setSecond , setUTC , setValues , setYear , setZone , setZoneHour , setZoneMinute , setZoneNegative , toCalendar , toDate |
public GDay()
public only for the generated source code
public GDay(String gday) throws ParseException
Constructs a GDay from a string value.
- Parameters:
gday
- the string representation of the GDay to instantiate
public GDay(int day)
Constructs a XML Schema GDay instance given all the values of the different fields. By default a GDay is not UTC and is local.
- Parameters:
day
-
public GDay(short day)
Constructs a XML Schema GDay instance given all the values of the different fields. By default a GDay is not UTC and is local.
- Parameters:
day
-
public short[] getValues()
Returns an array of short with all the fields that describe this gDay type. Note:the time zone is not included.
- Overrides:
- getValues in interface DateTimeBase
- Returns:
- an array of short with all the fields that describe this Date type.
public static Object parse(String str) throws ParseException
parse a String and convert it into an java.lang.Object
- Parameters:
str
- the string to parse
- Returns:
- an Object represented by the string
public static GDay parseGDay(String str) throws ParseException
parse a String and convert it into a GDay.
- Parameters:
str
- the string to parse
- Returns:
- the Date represented by the string
public void setMilliSecond(short millisecond)
- Overrides:
- setMilliSecond in interface DateTimeBase
public void setValues(short[] values)
Sets all the fields by reading the values in an array if a Time Zone is specificied it has to be set by usingsetZone
.
- Overrides:
- setValues in interface DateTimeBase
- Parameters:
values
- an array of shorts with the values the array is supposed to be of length 1 and ordered like the following:
- Day
public java.util.Date toDate()
converts this GDay into a local java Date.
- Overrides:
- toDate in interface DateTimeBase
- Returns:
- a local date representing this Date.
public String toString()
convert this GDay to a string The format is defined by W3C XML Schema recommendation and ISO8601 i.e ---DD(Z|(+|-)hh:mm)
- Returns:
- a string representing this Date