All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class Container.Container

java.lang.Object
   |
   +----Container.Container

public abstract class Container
extends Object
implements Serializable
Description:This class defines the Container element of a container list data 
structure. Each container contains an Object (subclasses define type) and a
reference to another container. This structure can contain any class of object and
is used by ContainerList/ContainerArray to create a heterogeneous list.
Note: that subclasses must be named ClassNameContainer ie PermanetEmployeeContainer, ContractEmployeeContainer
and VolunteerContainer must be pre compiled and placed in the Container package before use.
Also the subclasses must implement the GetValue() and SetValue(Object)methods.
And finally they must contain a default contructor so that the dynamic constructed Container
is append from ContainerList or ContainerArray will work.

Version:
1.0
Author:
Vicky Shiv

Variable Index

 o next
point to the next Container

Constructor Index

 o Container()
Default Constructor

Method Index

 o GetName()
This is the Abstract Function Implemented by Derived Classes It will return the "name" field of the Container
 o GetValue()
This is the Abstract Function Implemented by Derived Classes It will return the Reference Stored in the Container
 o Next()
Return the Next Container
 o readObject(ObjectInputStream)
These are the default function to be include to Implement Serialization This will call the DefalutReadObject function for the ObjectInputStream
 o SetNext(Container)
This Function will Set the Container "next" field to the reference passed
 o SetSalary(String)
This is the Abstract Function Implemented by Derived Classes It will Set the Salary/Wage of the Container
 o SetValue(Object)
This is the Abstract Function Implemented by Derived Classes It will Set the Container to the value passed as Object
 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 next
 protected Container next
point to the next Container

Constructors

 o Container
 public Container()
Default Constructor

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

 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

 o Next
 public Container Next()
Return the Next Container

Returns:
Container (Return the Reference to the next Container )
 o SetNext
 public void SetNext(Container next)
This Function will Set the Container "next" field to the reference passed

Parameters:
Container - : Reference to be set to the "next" field
 o GetValue
 public abstract Object GetValue()
This is the Abstract Function Implemented by Derived Classes It will return the Reference Stored in the Container

Returns:
Object (Return the reference stored in the container)
 o SetValue
 public abstract Object SetValue(Object value)
This is the Abstract Function Implemented by Derived Classes It will Set the Container to the value passed as Object

Parameters:
Object - Reference to be Set to the Container value
Returns:
Object (Reference of the container)
 o GetName
 public abstract String GetName()
This is the Abstract Function Implemented by Derived Classes It will return the "name" field of the Container

Returns:
String (The name field associated with the derieved Class)
 o SetSalary
 public abstract void SetSalary(String s) throws VolunteerSalaryException
This is the Abstract Function Implemented by Derived Classes It will Set the Salary/Wage of the Container

Parameters:
String - to be set as the salary/wage
Throws: VolunteerSalaryException
It will throws this exception if you want to set the salary of the Volunteer

All Packages  Class Hierarchy  This Package  Previous  Next  Index
1