would you just do
@Override
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)
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.