|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xins.common.types.standard.Date.Value
Value for the type _date. Represents a specific moment in time, with day-precision.
Constructor Summary | |
Date.Value(Calendar calendar)
Constructs a new date value based on the specified Calendar . |
|
Date.Value(Date date)
Constructs a new date value based on the specified java.util.Date object. |
|
Date.Value(int year,
int month,
int day)
Constructs a new date value. |
|
Date.Value(long millis)
Constructs a new date value based on the specified number of milliseconds since the UNIX Epoch. |
Method Summary | |
Object |
clone()
Creates and returns a copy of this object. |
boolean |
equals(Object obj)
|
int |
getDayOfMonth()
Returns the day of the month. |
int |
getMonthOfYear()
Returns the month of the year. |
int |
getYear()
Returns the year. |
int |
hashCode()
|
Date |
toDate()
Converts to a java.util.Date object. |
String |
toString()
Returns a textual representation of this object. |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Date.Value(int year, int month, int day)
year
- the year, e.g. 2005
.month
- the month of the year, e.g. 11
for November.day
- the day of the month, e.g. 1
for the first day of the
month.public Date.Value(Calendar calendar) throws IllegalArgumentException
Calendar
.
calendar
- the Calendar
object to get the exact date from, cannot be
null
.
IllegalArgumentException
- if calendar == null
.public Date.Value(Date date) throws IllegalArgumentException
java.util.Date
object.
date
- the Date
object to get the exact date from,
cannot be null
.
IllegalArgumentException
- if date == null
.public Date.Value(long millis) throws IllegalArgumentException
millis
- the number of milliseconds since the
UNIX Epoch.
IllegalArgumentException
- if millis < 0L
.System.currentTimeMillis()
Method Detail |
public Object clone()
null
.Object.clone()
public int getYear()
public int getMonthOfYear()
public int getDayOfMonth()
public boolean equals(Object obj)
public int hashCode()
public Date toDate()
java.util.Date
object.
Date
corresponding to this value.public String toString()
null
.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |