All Packages Class Hierarchy This Package Previous Next Index
Class Container.ContainerList
java.lang.Object
|
+----Container.Implementation
|
+----Container.ContainerList
- public class ContainerList
- extends Implementation
- implements Serializable
DescriptionThis class is derived from Implementation class .This is an List Container .
You can Dynamically switch from List Implementation to the Array
Implementation by the calling the Constructor .
- Version:
- 1.0
- Author:
- Vicky Shiv
-
first
- first is the Reference of type Container .This point to Front of the List
-
ContainerList()
- Default Constructor of the ListContainer
-
ContainerList(Object)
- Constuctor used to called while switching from one implementation to other
-
Append(Object)
- This is the default Append function which will append the new container in the
ListContainer.It will dynamically create an instance of the Container class
-
AppendImpl(Object)
- This function is called when we change the implementation at run time
This function copy reference the all containers of ContainerArray to
the ContainerList.This will be called by the Constructor while changing the implementation at run time
-
Member(String)
- This function tells that Employee with the "name" field is in the
ContianerList or not
-
PrintList()
- PrintList will print the Whole ContainerArray
-
readObject(ObjectInputStream)
- These are the default function to be include to Implement Serialization
This will call the DefalutReadObject function for the ObjectInputStream
-
SetSalary(String, String)
- SetSalary function set the Salary of the Employee (Searched by name ) by the
String passed as Salary
-
writeObject(ObjectOutputStream)
- These are the default function to be include to Implement Serialization
This will call the DefalutWriteObject function for the ObjectOutputStream
first
protected Container first
- first is the Reference of type Container .This point to Front of the List
ContainerList
public ContainerList()
- Default Constructor of the ListContainer
ContainerList
public ContainerList(Object obj)
- Constuctor used to called while switching from one implementation to other
- Parameters:
- Object - This is the Reference of ContainerArray
readObject
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
- These are the default function to be include to Implement Serialization
This will call the DefalutReadObject function for the ObjectInputStream
- Overrides:
- readObject in class Implementation
writeObject
private void writeObject(ObjectOutputStream out) throws IOException
- These are the default function to be include to Implement Serialization
This will call the DefalutWriteObject function for the ObjectOutputStream
- Overrides:
- writeObject in class Implementation
AppendImpl
public void AppendImpl(Object Obj)
- This function is called when we change the implementation at run time
This function copy reference the all containers of ContainerArray to
the ContainerList.This will be called by the Constructor while changing the implementation at run time
- Parameters:
- Object - This is the reference of the Container to be added
- Overrides:
- AppendImpl in class Implementation
Append
public void Append(Object Obj)
- This is the default Append function which will append the new container in the
ListContainer.It will dynamically create an instance of the Container class
- Parameters:
- Object - This is the reference of the Container to be added
- Overrides:
- Append in class Implementation
Member
public void Member(String name) throws EmployeePresentException, EmployeeNotPresentException
- This function tells that Employee with the "name" field is in the
ContianerList or not
- Parameters:
- String - the name which has to be match with the Employee "name"
- Throws: EmployeePresentException
- If Employee is Present with the same name
- Throws: EmployeeNotPresentException
- If Employee is not Present with the same name
- Overrides:
- Member in class Implementation
SetSalary
public void SetSalary(String name,
String salary) throws VolunteerSalaryException
- SetSalary function set the Salary of the Employee (Searched by name ) by the
String passed as Salary
- Parameters:
- String - The name of the Employee whose salary is to be changed
- String - The salary to be set as new salary
- Throws: VolunteerSalaryException
- throws this exception if the Employee is a volunter as you cannot set the salry of the Employee
- Overrides:
- SetSalary in class Implementation
PrintList
public void PrintList() throws ListEmptyException
- PrintList will print the Whole ContainerArray
- Throws: ListEmptyException
- if the Array is Empty
- Overrides:
- PrintList in class Implementation
All Packages Class Hierarchy This Package Previous Next Index