Data Structures and Algorithms
with Object-Oriented Design Patterns in C# |
The ChainedScatterTable class is introduced in Program . This class extends the AbstractHashTableClass introduced in Program . The scatter table is implemented as an array of Entry structs. The Entry struct is a nested struct defined within the ChainedScatterTable class.
Program: ChainedScatterTable fields and ChainedScatterTable.Entry struct.
Each Entry instance has two fields--obj and next. The former refers to a ComparableObject. The latter indicates the position in the array of the next element of a chain. The value of the constant NULL will be used instead of zero to mark the end of a chain. The value zero is not used to mark the end of a chain because zero is a valid array subscript.