public class CalendarUnit extends Object
DefaultCalendarProvider
Modifier and Type | Field and Description |
---|---|
protected Date |
endDate |
protected Date |
startDate |
protected int |
unitIndex |
protected String |
units |
Constructor and Description |
---|
CalendarUnit()
Default constructor
|
CalendarUnit(Date startDate,
Date endDate,
int unitIndex,
String units)
Constructor to initialize the calendar unit's values.
|
Modifier and Type | Method and Description |
---|---|
Date |
getEndDate()
Get the end date of this unit.
|
Date |
getStartDate()
Get the start date of this unit.
|
int |
getUnitIndex()
Get the current day within this unit of measure.
|
String |
getUnits()
Get the unit of measure.
|
void |
setEndDate(Date endDate)
Set the end date of this unit.
|
void |
setStartDate(Date startDate)
Set the start date of this unit.
|
void |
setUnitIndex(int unitIndex)
Set the index of the current day within this unit of measure.
|
void |
setUnits(String units)
Set the unit of measure.
|
protected Date startDate
protected Date endDate
protected int unitIndex
protected String units
public CalendarUnit()
public CalendarUnit(Date startDate, Date endDate, int unitIndex, String units)
startDate
- The start date for this unit. May not be null.endDate
- The end date for this unit. May not be null.unitIndex
- The index of a Day within this unit.units
- The type of unit. ( day, week, month, year )public Date getEndDate()
public void setEndDate(Date endDate)
endDate
- The end date this unit.public Date getStartDate()
public void setStartDate(Date startDate)
startDate
- The start date this unit.public int getUnitIndex()
public void setUnitIndex(int unitIndex)
unitIndex
- An index value that starts at one.public String getUnits()
DefaultCalendarProvider
public void setUnits(String units)
units
- A text value for the calendar unit type.DefaultCalendarProvider