Skip to content

Implementing a Relation ADT using a (closed-bucket) hash table

Notifications You must be signed in to change notification settings

fxya/HashRelation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

HashRelation

Implementing a Relation abstract data type (ADT) using a (closed bucket) Hash Table data structure.

About

A Relation is essentially a generalization of a Map. Whereas a Map demands that each key is unique, a Relation allows for duplicate keys with different values and instead tests that a given key/value pair is unique. It's similar to a MultiMap but only allows for a single instance of a given key/value pair.

This repo contains an interface, Relation.java, which declares the methods that characterise a Relation. This interface acts as a contract for implementing classes and uses generic typing.

HashRelation.java is the class implementing Relation.java with a Hash Table. It relies on a private static inner class, Node, to generate buckets.

To-do

  • Example class with main method
  • J-Unit test cases

About

Implementing a Relation ADT using a (closed-bucket) hash table

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages