Package com.liferay.portal.kernel.cal
Class DayAndPosition
Object
com.liferay.portal.kernel.cal.DayAndPosition
- All Implemented Interfaces:
Serializable
,Cloneable
- Author:
- Jonathan Lennox
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a DayAndPositionDayAndPosition
(int day, int position) Constructs a DayAndPosition with the day of the week and day position. -
Method Summary
Modifier and TypeMethodDescriptionclone()
Returns a clone of this DayAndPosition.boolean
Returnstrue
if the object equals this DayAndPosition.int
Returns the day of the week.int
Returns the day position.int
hashCode()
Returns the hash code of this DayAndPosition.static boolean
isValidDayOfWeek
(int d) Returnstrue
if the day is a valid day of the week.static boolean
isValidDayPosition
(int p) Returnstrue
if the day position is valid.void
setDayOfWeek
(int d) Sets the day of the weekvoid
setDayPosition
(int p) Sets the day positiontoString()
Returns a string representation of the DayAndPosition
-
Field Details
-
NO_WEEKDAY
public static final int NO_WEEKDAYField NO_WEEKDAY- See Also:
-
-
Constructor Details
-
DayAndPosition
public DayAndPosition()Constructs a DayAndPosition -
DayAndPosition
public DayAndPosition(int day, int position) Constructs a DayAndPosition with the day of the week and day position.
-
-
Method Details
-
isValidDayOfWeek
public static boolean isValidDayOfWeek(int d) Returnstrue
if the day is a valid day of the week.- Parameters:
d
- the day of the week in terms ofCalendar
orNO_WEEKDAY
- Returns:
true
if the day is a valid day of the week;false
otherwise
-
isValidDayPosition
public static boolean isValidDayPosition(int p) Returnstrue
if the day position is valid.- Parameters:
p
- the day position- Returns:
true
if the day position is valid;false
otherwise
-
clone
Returns a clone of this DayAndPosition. -
equals
Returnstrue
if the object equals this DayAndPosition. -
getDayOfWeek
public int getDayOfWeek()Returns the day of the week.- Returns:
- the day of the week
-
getDayPosition
public int getDayPosition()Returns the day position.- Returns:
- the day position
-
hashCode
public int hashCode()Returns the hash code of this DayAndPosition. -
setDayOfWeek
public void setDayOfWeek(int d) Sets the day of the week- Parameters:
d
- the day of the week
-
setDayPosition
public void setDayPosition(int p) Sets the day position- Parameters:
p
- the day position
-
toString
Returns a string representation of the DayAndPosition
-