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.booleanReturnstrueif the object equals this DayAndPosition.intReturns the day of the week.intReturns the day position.inthashCode()Returns the hash code of this DayAndPosition.static booleanisValidDayOfWeek(int d) Returnstrueif the day is a valid day of the week.static booleanisValidDayPosition(int p) Returnstrueif the day position is valid.voidsetDayOfWeek(int d) Sets the day of the weekvoidsetDayPosition(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) Returnstrueif the day is a valid day of the week.- Parameters:
d- the day of the week in terms ofCalendarorNO_WEEKDAY- Returns:
trueif the day is a valid day of the week;falseotherwise
-
isValidDayPosition
public static boolean isValidDayPosition(int p) Returnstrueif the day position is valid.- Parameters:
p- the day position- Returns:
trueif the day position is valid;falseotherwise
-
clone
Returns a clone of this DayAndPosition. -
equals
Returnstrueif 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
-