SeparateChainingHashTable - package DataStructures; / / / /...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
package DataStructures; // SeparateChainingHashTable class // // CONSTRUCTION: with an approximate initial size or default of 101 // // ******************PUBLIC OPERATIONS********************* // void insert( x ) --> Insert x // void remove( x ) --> Remove x // Hashable find( x ) --> Return item that matches x // void makeEmpty( ) --> Remove all items // int hash( String str, int tableSize ) // --> Static method to hash strings // ******************ERRORS******************************** // insert overrides previous value if duplicate; not an error /** * Separate chaining table implementation of hash tables. * Note that all "matching" is based on the equals method. * @author Mark Allen Weiss */ public class SeparateChainingHashTable { /** * Construct the hash table. */ public SeparateChainingHashTable( ) { this( DEFAULT_TABLE_SIZE ); } /** * Construct the hash table. * @param size approximate table size. */ public SeparateChainingHashTable( int size )
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/22/2011 for the course CSC 532 taught by Professor Dr.gursaranadhar during the Spring '07 term at University of North Carolina Wilmington.

Page1 / 3

SeparateChainingHashTable - package DataStructures; / / / /...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online