Hash Maps/OOP
From charlesreid1
Building on the application of object-oriented programming principles to the map abstract data type covered at Maps/OOP, this page will cover some of the general ideas and nuances of implementing a hash map in an object-oriented way.
Recap of map inheritance structure
To recap, here is how these classes are organized:
- Map is an interface class that defines the public interfaces that any Map data container must implement
- AbstractMap is an abstract class that does the following:
- Define a map item (utility) class
- This is designed to take a K,V key value pair
- Also defines four more classes:
- Two Iterators and two Iterables - the key and value Iterator and Iterable classes.