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