Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail From: Roedy Green Newsgroups: comp.lang.java.programmer Subject: Re: Support Map & Map Date: Fri, 07 Oct 2011 10:48:03 -0700 Organization: Canadian Mind Products Lines: 32 Message-ID: <3heu87dhdoq9ehsireerf0dovnkp0oorbp@4ax.com> References: <4d229842-c018-471a-b465-466221ba5aa0@n12g2000yqh.googlegroups.com> Reply-To: Roedy Green NNTP-Posting-Host: RCd/Ul4tyxGUBII8WGwa5g.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 X-Newsreader: Forte Agent 6.00/32.1186 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:8633 On Fri, 7 Oct 2011 03:49:35 -0700 (PDT), albert kao wrote, quoted or indirectly quoted someone who said : >I look at http://mindprod.com/jgloss/delegate.html but still don't >know how to apply it to my situation. >Would you mind posting some source codes? What you do is in your class have something like this: HashtMap map1; HashMap map2; public Map getMap1() { return map1; } public Map getMay2() { return map2; } Or you don't expose the raw Maps, but just offer a few wrapper methods that call methods on your two maps. public boolean put1( String s, Thing t) { return map1.put( s, t ); } -- Roedy Green Canadian Mind Products http://mindprod.com It should not be considered an error when the user starts something already started or stops something already stopped. This applies to browsers, services, editors... It is inexcusable to punish the user by requiring some elaborate sequence to atone, e.g. open the task editor, find and kill some processes.