|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--Shifts
Represents an employee's shift (either filled already or to be filled in later)
| Field Summary | |
private Employees |
assignedEmployee
Assigned employee |
private boolean |
isFilled
True if shift has been filled, false otherwise |
private Skills |
shiftSkill
Required skill |
private DayTimeRanges |
shiftTime
Shift durration |
| Constructor Summary | |
Shifts(Times startTime,
Times endTime,
Skills skill)
Constructs a shift that hasn't been filled yet |
|
Shifts(Times startTime,
Times endTime,
Skills skill,
Employees employee)
Constructs a shift that has been filled already |
|
| Method Summary | |
java.lang.Object |
clone()
Makes a copy of the current object |
Employees |
GetEmployee()
Gets the employee that is assigned to this shift, null if no employee is assigned. |
Skills |
GetSkill()
Gets the skill required for the shift |
DayTimeRanges |
GetTime()
Gets the time of the shift |
void |
SetEmployee(Employees newEmployee)
Modifies or sets the employee assigned to a shift |
void |
SetSkill(Skills newSkill)
Changes the skill assigned to a shift |
void |
SetTime(DayTimeRanges newTime)
Changes the time of the shift |
boolean |
ShiftIsFilled()
Checks to see if the shift has been filled already |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
private DayTimeRanges shiftTime
private Skills shiftSkill
private Employees assignedEmployee
private boolean isFilled
| Constructor Detail |
public Shifts(Times startTime,
Times endTime,
Skills skill)
Preconditions:
startTime and endTime are within the valid
range (0.0-23.5 to nearest .5)
startTime < endTime
Postconditions:
a new shift will be constructed with given
startTime, endTime, and skill
startTime - starting time for the shiftendTime - ending time for the shiftskill - skill required for the shift
public Shifts(Times startTime,
Times endTime,
Skills skill,
Employees employee)
Preconditions:
startTime and endTime are within the valid
range (0.0-23.5 to nearest .5)
startTime < endTime
Postconditions:
a new shift will be constructed with given
startTime, endTime, skill, and employee
startTime - starting time for the shiftendTime - ending time for the shiftskill - skill required for the shiftemployee - the employee already assigned to the shift| Method Detail |
public void SetTime(DayTimeRanges newTime)
Preconditions: (none)
Postconditions: The time durration for the shift will be set to the given newTime
newTime - new time for the shiftpublic void SetSkill(Skills newSkill)
Preconditions: (none)
Postconditions: The skill associated with the shift will be reassigned to the value of the given newSkill
newSkill - new skill for the shiftpublic void SetEmployee(Employees newEmployee)
Preconditions: (none)
Postconditions: The employee associated with the shift will be assigned the value of the given newEmployee and the shift will now be considered "filled"
newEmployee - employee to assign to shiftpublic Employees GetEmployee()
Preconditions: (Shift should be filled before calling this method, otherwise the return value is null)
Postconditions: The method will return the employee currently assigned to work the shift in question
public DayTimeRanges GetTime()
Preconditions: (none)
Postconditions: The method will return the time range that the shift is spanning
public Skills GetSkill()
Preconditions: (none)
Postconditions: The method will return the skill that is currently associated with this shift
public boolean ShiftIsFilled()
Preconditions: (none)
Postconditions: The method will return whether or not the shift has already been filled
public java.lang.Object clone()
Preconditions: (none)
Postconditions: A copy of the object will be made and returned
clone in class java.lang.Object
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||