Question about clone a Hashtable

Reply

Join Date: Nov 2004
Posts: 189
Reputation: George2 is an unknown quantity at this point 
Solved Threads: 0
George2 George2 is offline Offline
Junior Poster

Question about clone a Hashtable

 
0
  #1
May 15th, 2005
Hello everyone,


I want to clone the content of a Hashtable (its keys, its values and its key-value relationship). But I have found that the clone method can not completely clone a Hashtable, as is mentioned in the description of clone method of Java API Specification,

Creates a shallow copy of this hashtable. All the structure of the hashtable itself is copied, but the keys and values are not cloned. This is a relatively expensive operation.

I am wondering what is the efficient and effective approach of cloning a Hashtable, including the clone of its keys, its values and its key-value relationship.


Thanks in advance,
George
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Java Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC