|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hackystat.utilities.time.period.Month
public class Month
Provides the Month abstract data type, which represents the collection of Week and Day instances in a given month. The Calendar is forced to Locale.US to ensure constant week boundaries.
Constructor Summary | |
---|---|
Month(int year,
int month)
Creates a Month instance for the given year and month. |
|
Month(javax.xml.datatype.XMLGregorianCalendar xmlDay)
Returns the Month instance corresponding to the passed XMLGregorianCalendar instance. |
Method Summary | |
---|---|
int |
compareTo(java.lang.Object o)
Compares two Month instances. |
Month |
dec()
Returns the Month instance prior to this Month. |
boolean |
equals(java.lang.Object obj)
Returns true if the passed object is a month and is equal to this Month. |
java.util.List<Day> |
getDays()
Returns a list of Day instances from the first Day to the last Day in this Month. |
Day |
getFirstDay()
Returns the first Day instance associated with this Month. |
Week |
getFirstWeekInMonth()
Returns the Week instance associated with the first day in this Month. |
Day |
getLastDay()
Returns the last Day instance associated with this Month. |
Week |
getLastWeekInMonth()
Returns the Week instance associated with the last Day of this Month. |
int |
getMonth()
Returns the zero-based month associated with this Month. |
int |
getNumOfDays()
Returns the number of days in this Month. |
int |
getYear()
Returns the year associated with this Month. |
int |
hashCode()
Hash code of this Month. |
Month |
inc()
Returns the Month instance after this Month. |
java.lang.String |
toString()
String representation of this Month. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Month(int year, int month)
year
- The calendar year, such as 2004.month
- The zero-based calendar month, such as 0 (January) or 11 (December).public Month(javax.xml.datatype.XMLGregorianCalendar xmlDay)
xmlDay
- The XMLGregorianCalendar date.Method Detail |
---|
public int getYear()
public int getMonth()
public Day getFirstDay()
getFirstDay
in interface TimePeriod
public Week getFirstWeekInMonth()
public Day getLastDay()
public Week getLastWeekInMonth()
public int getNumOfDays()
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable<java.lang.Object>
o
- Another month object.
public Month dec()
public Month inc()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- Any object.
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.List<Day> getDays()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |