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

Variable Index

 o first
first is the Reference of type Container .This point to Front of the List

Constructor Index

 o ContainerList()
Default Constructor of the ListContainer
 o ContainerList(Object)
Constuctor used to called while switching from one implementation to other

Method Index

 o 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
 o 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
 o Member(String)
This function tells that Employee with the "name" field is in the ContianerList or not
 o PrintList()
PrintList will print the Whole ContainerArray
 o readObject(ObjectInputStream)
These are the default function to be include to Implement Serialization This will call the DefalutReadObject function for the ObjectInputStream
 o SetSalary(String, String)
SetSalary function set the Salary of the Employee (Searched by name ) by the String passed as Salary
 o writeObject(ObjectOutputStream)
These are the default function to be include to Implement Serialization This will call the DefalutWriteObject function for the ObjectOutputStream

Variables

 o first
 protected Container first
first is the Reference of type Container .This point to Front of the List

Constructors

 o ContainerList
 public ContainerList()
Default Constructor of the ListContainer

 o ContainerList
 public ContainerList(Object obj)
Constuctor used to called while switching from one implementation to other

Parameters:
Object - This is the Reference of ContainerArray

Methods

 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
1