Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## dataStructures
Class HashChains

    java.lang.Object
      |
      +--dataStructures.HashChains

public class HashChains
extends java.lang.Object

Constructor Summary
`HashChains(int theDivisor)`

Method Summary
`java.lang.Object` | `get(java.lang.Object theKey)`
`boolean` | `isEmpty()`
`static void` | `main(java.lang.String[] args)` test method
`void` | `output()` output the hash table
`java.lang.Object` | `put(java.lang.Object theKey, java.lang.Object theElement)` insert an element with the specified key overwrite old element if there is already an element with the given key
`java.lang.Object` | `remove(java.lang.Object theKey)`
`int` | `size()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### HashChains

    public HashChains(int theDivisor)

Method Detail

### isEmpty

    public boolean isEmpty()

  Returns:
    true iff the hash table is empty

### size

    public int size()

  Returns:
    current number of elements in the hash table

### get

    public java.lang.Object get(java.lang.Object theKey)

  Returns:
    element with specified key

### put

    public java.lang.Object put(java.lang.Object theKey,
                                java.lang.Object theElement)

  insert an element with the specified key overwrite old element if there is already an element with the given key
  Returns:
    old element (if any) with key theKey

### remove

    public java.lang.Object remove(java.lang.Object theKey)

  Returns:
    matching element and remove it

### output

    public void output()

  output the hash table

### main

    public static void main(java.lang.String[] args)

  test method

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD