net.handle.jdb
Class LongTable

java.lang.Object
  extended by net.handle.jdb.LongTable

public class LongTable
extends java.lang.Object


Constructor Summary
LongTable()
          Constructor with default initial capacity and default load factor.
LongTable(int initialCapacity)
          Constructor with explicit initial capacity, default load factor.
LongTable(int initialCapacity, float loadFactor)
          Constructor with explicit initial capacity and load factor.
 
Method Summary
 void clear()
          Clear the entire table.
 boolean contains(net.handle.jdb.Block value)
          Return true if table contains given block, otherwise false.
 boolean containsKey(long key)
          Return true if given key is in table, otherwise false.
 net.handle.jdb.Block get(long key)
          Fetch the block value for the given key.
 boolean isEmpty()
          Return true if table is empty, otherwise false.
 LongTableEnumerator keys()
          Return an enumerator object for the table.
 void put(long key, net.handle.jdb.Block value)
          Enter the given value into the table by the given key.
protected  void rehash()
          Rehash the table.
 void remove(long key)
          Remove the block for the given key from the table.
 int size()
          Return number of elements in table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LongTable

public LongTable(int initialCapacity,
                 float loadFactor)
Constructor with explicit initial capacity and load factor.


LongTable

public LongTable(int initialCapacity)
Constructor with explicit initial capacity, default load factor.


LongTable

public LongTable()
Constructor with default initial capacity and default load factor.

Method Detail

size

public int size()
Return number of elements in table.


isEmpty

public boolean isEmpty()
Return true if table is empty, otherwise false.


keys

public LongTableEnumerator keys()
Return an enumerator object for the table.


contains

public boolean contains(net.handle.jdb.Block value)
Return true if table contains given block, otherwise false.


containsKey

public boolean containsKey(long key)
Return true if given key is in table, otherwise false.


get

public net.handle.jdb.Block get(long key)
Fetch the block value for the given key.


rehash

protected void rehash()
Rehash the table.


put

public void put(long key,
                net.handle.jdb.Block value)
Enter the given value into the table by the given key. If threshold would be exceeded, double the table's size and go recursive.


remove

public void remove(long key)
Remove the block for the given key from the table.


clear

public void clear()
Clear the entire table.