|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.fudgemsg.types.FudgeDate
public class FudgeDate
Dummy class for holding a date value on its own, at varying precision. Dates can be more easily used through the secondary type mechanism.
For more details, please refer to DateTime encoding.
Constructor Summary | |
---|---|
|
FudgeDate(Calendar date)
Creates a new FudgeDate object. |
|
FudgeDate(DateProvider dateProvider)
Creates a new FudgeDate object. |
protected |
FudgeDate(Instant instant)
Creates a new FudgeDate object. |
|
FudgeDate(InstantProvider instantProvider)
Creates a new FudgeDate object. |
|
FudgeDate(int year)
Constructs a new FudgeDate object representing just a year. |
|
FudgeDate(int year,
int month)
Constructs a new FudgeDate object representing a year and a month. |
|
FudgeDate(int year,
int month,
int day)
Constructs a new FudgeDate object. |
protected |
FudgeDate(LocalDate localDate)
Creates a new FudgeDate object. |
Method Summary | |
---|---|
boolean |
equals(Object o)
|
DateTimeAccuracy |
getAccuracy()
Returns the accuracy of the Date. |
int |
getDayOfMonth()
Returns the day of the month, or 0 if the date just represents a year or year/month. |
int |
getMonthOfYear()
Returns the month of the year, or 0 if the date just represents a year |
int |
getYear()
Returns the year. |
int |
hashCode()
|
LocalDate |
toLocalDate()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FudgeDate(int year)
FudgeDate
object representing just a year.
year
- the yearpublic FudgeDate(int year, int month)
FudgeDate
object representing a year and a month.
year
- the yearmonth
- the monthpublic FudgeDate(int year, int month, int day)
FudgeDate
object.
year
- the yearmonth
- the monthday
- the daypublic FudgeDate(Calendar date)
FudgeDate
object.
date
- Calendar
object supplying the year, month and dayprotected FudgeDate(Instant instant)
FudgeDate
object.
instant
- the date corresponding to this instant at UTC will initialize the objectprotected FudgeDate(LocalDate localDate)
FudgeDate
object.
localDate
- the LocalDate
representation of the datepublic FudgeDate(InstantProvider instantProvider)
FudgeDate
object.
instantProvider
- the date corresponding to the Instant
provided at UTC will initialize the objectpublic FudgeDate(DateProvider dateProvider)
FudgeDate
object.
dateProvider
- provides the LocalDate
representation of the dateMethod Detail |
---|
public String toString()
toString
in class Object
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public int getYear()
public int getMonthOfYear()
public int getDayOfMonth()
public DateTimeAccuracy getAccuracy()
public LocalDate toLocalDate()
toLocalDate
in interface DateProvider
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |