public class DayAndPosition
extends Object
implements Cloneable, Serializable
Modifier and Type | Field and Description |
---|---|
static int |
NO_WEEKDAY
Field NO_WEEKDAY
|
Constructor and Description |
---|
DayAndPosition()
Constructs a DayAndPosition
|
DayAndPosition(int d,
int p)
Constructs a DayAndPosition with the day of the week and day position.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Returns a clone of this DayAndPosition.
|
boolean |
equals(Object obj)
Returns
true if the object equals this DayAndPosition. |
int |
getDayOfWeek()
Returns the day of the week.
|
int |
getDayPosition()
Returns the day position.
|
int |
hashCode()
Returns the hash code of this DayAndPosition.
|
static boolean |
isValidDayOfWeek(int d)
Returns
true if the day is a valid day of the week. |
static boolean |
isValidDayPosition(int p)
Returns
true if the day position is valid. |
void |
setDayOfWeek(int d)
Sets the day of the week
|
void |
setDayPosition(int p)
Sets the day position
|
String |
toString()
Returns a string representation of the DayAndPosition
|
public static final int NO_WEEKDAY
public DayAndPosition()
public DayAndPosition(int d, int p)
public static boolean isValidDayOfWeek(int d)
true
if the day is a valid day of the week.d
- the day of the week in terms of Calendar
or NO_WEEKDAY
true
if the day is a valid day of the week;
false
otherwisepublic static boolean isValidDayPosition(int p)
true
if the day position is valid.p
- the day positiontrue
if the day position is valid;
false
otherwisepublic Object clone()
clone
in class Object
public boolean equals(Object obj)
true
if the object equals this DayAndPosition.equals
in class Object
obj
- the other objecttrue
if the object equals this DayAndPosition,
false
otherwisepublic int getDayOfWeek()
public int getDayPosition()
public int hashCode()
hashCode
in class Object
public void setDayOfWeek(int d)
d
- the day of the weekpublic void setDayPosition(int p)
p
- the day positionpublic String toString()
toString
in class Object