Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / January 2008

Tip: Looking for answers? Try searching our database.

Re:WeakHashMap

Thread view: 
rony.john@gmail.com - 11 Jan 2008 16:06 GMT
hi all,
     i need to create a map having properties both insertion order
and week reference.
can i use

   Map map = new LinkedHashMap(new WeakHashMap());

regards,
rony
Lasse Reichstein Nielsen - 11 Jan 2008 17:07 GMT
>       i need to create a map having properties both insertion order
> and week reference.
> can i use
>
>     Map map = new LinkedHashMap(new WeakHashMap());

No. That just gives you a LinkedHashMap containing the contents of
the empty WeakHashMap.

You will need to make a composite map yourself.

You might be able to use the commons collections classes, e.g.,
LinkedMap and TransformedMap.

/L
Signature

Lasse Reichstein Nielsen  -  lrn@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
 'Faith without judgement merely degrades the spirit divine.'



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.