|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ListOfEmployees
Is a representation of a list of employees.
Field Summary | |
private java.util.Vector |
data
A vector of employees |
Constructor Summary | |
ListOfEmployees()
Constructs an empty list of employees |
|
ListOfEmployees(java.util.Vector employees)
Constructs the list of employees from a vector of employees |
Method Summary | |
void |
AddEmployee(Employees toAdd)
Adds an employee to the list |
java.lang.Object |
clone()
Creates a copy of the current object |
Employees |
GetEmployee(java.lang.String employeeName)
Pre-conditions: A valid variable of type String is passed. |
java.util.Vector |
GetEmployeeNames()
Pre-conditions: none Post-conditions: Returns the vector of employees. |
boolean |
IsIn(Employees toCheck)
Pre-conditions: A valid variable of type of Employees is passed. |
void |
RemoveEmployees(java.util.Vector toRemove)
Removes employees from the list |
Methods inherited from class java.lang.Object |
|
Field Detail |
private java.util.Vector data
Constructor Detail |
public ListOfEmployees()
Pre-conditions: none
Post-conditions: The vector of data for this class is initialized.
public ListOfEmployees(java.util.Vector employees)
Pre-conditions: A valid vector of employees is passed.
Post-conditions: The passed vector of employees is added to the private vector of employees.
employees
- a vector of employees that need to be added
to the listMethod Detail |
public void AddEmployee(Employees toAdd)
Pre-conditions: A valid variable of type Employees is passed.
Post-conditions: The passed variable is added to the private vector of employees.
toAdd
- the employee that needs to be added to the list;
if the employee is already in the list (or an employee with the
same name is), then the employee will not be added.public void RemoveEmployees(java.util.Vector toRemove)
Pre-conditions: A valid vector of employees is passed.
Post-conditions: The passed vector of employees are removed from the private vector of employees,
that is if they are in the list.
toRemove
- the vector of employees that need to be removed from
the list; employees are removed by name and therefore that is all that
is important when sending a vector of employees to be removedpublic java.util.Vector GetEmployeeNames()
public Employees GetEmployee(java.lang.String employeeName)
public boolean IsIn(Employees toCheck)
public java.lang.Object clone()
Pre-conditions: none
Post-conditions: A copy of the current ListOfEmployees object is returned.
clone
in class java.lang.Object
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |