would you just do

public boolean contains(T param){
    return hashTable[function(param)]!=null;

What's the context for this? Are you extending Hashtable for your own purposes? Is this a complete new implementation of a hash table?

Did you see that Hashtable is obsolete? "If a thread-safe implementation is not needed, it is recommended to use HashMap in place of Hashtable. If a thread-safe highly-concurrent implementation is desired, then it is recommended to use ConcurrentHashMap in place of Hashtable." (Hashtable API doc)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.