|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.prozima.time.DayAndYear
public class DayAndYear
Represents a specific day in time by specifying a specific year and the day of this year. Class has no concept of hourly time or timezone. Its an immutable class, therefore instances of the class cannot be changed after their construction.
| Constructor Summary | |
|---|---|
DayAndYear(java.util.Date inDate)
Create a new instance of a DayAndYear, specifying the day using Date. |
|
DayAndYear(int inYear,
int inDayOfYear)
Create a new instance of a DayAndYear, specifying the year and day individually. |
|
| Method Summary | |
|---|---|
boolean |
after(DayAndYear inOther)
Compare this day and year against another specified day and year to check if the this day/year is after that specified by inOther. |
boolean |
before(DayAndYear inOther)
Compare this day and year against another specified day and year to check if the this day/year is before that specified by inOther. |
int |
compareTo(DayAndYear inOther)
|
boolean |
equals(java.lang.Object inObject)
|
int |
getDayOfYear()
Get the day of the year represented by this DayAndYear. |
int |
getYear()
Get the Year represented by this DayAndYear. |
int |
hashCode()
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DayAndYear(java.util.Date inDate)
Date.
inDate - A specific date. The time part of the date is ignored. Cannot be null.
public DayAndYear(int inYear,
int inDayOfYear)
inYear - Integer representing the year e.g. 2004, 2010, 1977 etc..inDayOfYear - Index of the day of the year. 1st of January is 1.| Method Detail |
|---|
public boolean after(DayAndYear inOther)
inOther - A different day and year.
java.lang.IllegalArgumentException - is thrown if inOther is null.public boolean before(DayAndYear inOther)
inOther - A different day and year.
java.lang.IllegalArgumentException - is thrown if inOther is null.public int compareTo(DayAndYear inOther)
compareTo in interface java.lang.Comparable<DayAndYear>public boolean equals(java.lang.Object inObject)
equals in class java.lang.Objectpublic int getDayOfYear()
public int getYear()
public int hashCode()
hashCode in class java.lang.Objectpublic 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 | ||||||||