|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.idoox.wasp.serialization.xsdbuiltin.DateTimeBase
org.idoox.wasp.serialization.xsdbuiltin.Date
The class represents xsd date type.
Field Summary |
Fields inherited from class org.idoox.wasp.serialization.xsdbuiltin.DateTimeBase |
isNegative, timeZone |
Constructor Summary | |
Date(java.util.Date date)
Constructor, initializes object. |
|
Date(int year,
int month,
int day,
TimeZone timeZone,
boolean minusSign)
Constructor. |
|
Date(java.lang.String date)
constructor that initializes this object. |
Method Summary | |
boolean |
equals(java.lang.Object o)
Equals based on day, month, year and DateTimeBase values. |
int |
getDay()
Returns day member of this object. |
int |
getMonth()
Returns month value of this object in the interval 0-11. |
int |
getYear()
Returns year member of this object. |
int |
hashCode()
|
void |
setDay(int day)
Sets day to the given value. |
void |
setMonth(int month)
Sets month to the given value. |
void |
setParams(java.util.Date date)
Sets parameters of this object to the given java.util.Date object. |
void |
setParams(int year,
int month,
int day,
TimeZone timeZone,
boolean isNegative)
Sets parameters of this object. |
void |
setYear(int year)
Sets year to the given value. |
java.util.Date |
toJavaUtilDate()
Converts parameters of this object to the java.util.Date Object. |
java.lang.String |
toString()
Deserializes this object to XSD string that represents date. |
Methods inherited from class org.idoox.wasp.serialization.xsdbuiltin.DateTimeBase |
getTimeZone, hasNegativeValue, inputMonth, outputMonth, setDefaultTimeZone, setParams |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Date(int year, int month, int day, TimeZone timeZone, boolean minusSign) throws DateTimeException
year
- a value of year.month
- a value of month (in interval 0-11).day
- a value of day.timeZone
- a value of time zone. It may be null.minusSign
- indicator that time has negative value.
DateTimeException
- thrown when parameters are invalid.public Date(java.lang.String date) throws DateTimeException
date
- a given date string in XML Schema format.
DateTimeException
- Description of Exceptionpublic Date(java.util.Date date)
java.util.Date
object.
The object is being created without timezone. Year, day and month
are read from a given java.util.Date object (with respect to the java
default timezone). Hour, minute and second are ignored.
date
- a date value to set.Method Detail |
public void setParams(int year, int month, int day, TimeZone timeZone, boolean isNegative) throws DateTimeException
year
- a value of year.month
- a value of month (in interval 0-11).day
- a value of day.timeZone
- a value of time zone. It may be null.isNegative
- indicates that it is negative dateTime.
DateTimeException
- thrown when parameters
are invalid.public void setParams(java.util.Date date)
java.util.Date
object.
Hour, minute and second are ignored.
date
- a date value to set.public java.util.Date toJavaUtilDate()
public int getYear()
public int getMonth()
public int getDay()
public java.lang.String toString()
public void setYear(int year)
year
- the given year to set to.public void setMonth(int month)
month
- the given month to set to.public void setDay(int day)
day
- the given day to set to.public boolean equals(java.lang.Object o)
DateTimeBase
values.
All these values must be equal, for example no recalculation to different time zone is done.
public int hashCode()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |