[Java lista] tombok kulonbsege

Zoltan Mozes Zoltan_Mozes at epam.com
2007. Feb. 7., Sze, 15:16:16 CET


Hali

 

Meg kéne mondd mit értesz azalatt hogy a két Map különbségét. (itt mot tökmindegy hogy HashMap vagy Treemap, Map oszt' jónapot, kevesebbet is kel gépelni :-))

 

1)       kölünbség alatt azt érded-e hogy "A" Map key-ei: A halmaz, "B" Map key-ei "B" és (A-B)U(B-A)  = H halmaz kell neked? 

2)       vagy nem csak a key-ek számítanak, hanem ha Aban és B ben megvan ugyanaz a key _de más_ value tartozik hozzá, azt is különbőzőnek veszed?

 

Ha ez el van határozva akkor lehet továbbmenni.

 

Hint: ki lehet nyerni a Map kulcsait

 

 Set <file:///C:\Documents%20and%20Settings\Zoltan_Mozes\My%20Documents\Development\JavaDoc\5.0\docs\api\java\util\Set.html> <K <file:///C:\Documents%20and%20Settings\Zoltan_Mozes\My%20Documents\Development\JavaDoc\5.0\docs\api\java\util\Map.html> >

keySet <file:///C:\Documents%20and%20Settings\Zoltan_Mozes\My%20Documents\Development\JavaDoc\5.0\docs\api\java\util\Map.html#keySet()> () 
          Returns a set view of the keys contained in this map.

 

ezután van a Set interfészen

 boolean

removeAll <file:///C:\Documents%20and%20Settings\Zoltan_Mozes\My%20Documents\Development\JavaDoc\5.0\docs\api\java\util\Set.html#removeAll(java.util.Collection)> (Collection <file:///C:\Documents%20and%20Settings\Zoltan_Mozes\My%20Documents\Development\JavaDoc\5.0\docs\api\java\util\Collection.html> <?> c) 
          Removes from this set all of its elements that are contained in the specified collection (optional operation).

 a kivonáshoz.

 

 boolean

addAll <file:///C:\Documents%20and%20Settings\Zoltan_Mozes\My%20Documents\Development\JavaDoc\5.0\docs\api\java\util\Set.html#addAll(java.util.Collection)> (Collection <file:///C:\Documents%20and%20Settings\Zoltan_Mozes\My%20Documents\Development\JavaDoc\5.0\docs\api\java\util\Collection.html> <? extends E <file:///C:\Documents%20and%20Settings\Zoltan_Mozes\My%20Documents\Development\JavaDoc\5.0\docs\api\java\util\Set.html> > c) 
          Adds all of the elements in the specified collection to this set if they're not already present (optional operation).

 

És ott van még a Collections (Util osztály) is, hátha találsz benne asznosat mint pl akár:

static boolean

disjoint <file:///C:\Documents%20and%20Settings\Zoltan_Mozes\My%20Documents\Development\JavaDoc\5.0\docs\api\java\util\Collections.html#disjoint(java.util.Collection, java.util.Collection)> (Collection <file:///C:\Documents%20and%20Settings\Zoltan_Mozes\My%20Documents\Development\JavaDoc\5.0\docs\api\java\util\Collection.html> <?> c1, Collection <file:///C:\Documents%20and%20Settings\Zoltan_Mozes\My%20Documents\Development\JavaDoc\5.0\docs\api\java\util\Collection.html> <?> c2) 
          Returns true if the two specified collections have no elements in common.

 

 

Best Regards,
Zoltán Mózes


EPAM Systems
Budapest office, Hungary (GMT+1)

Office phone:        +36 (1) 327-74-XX
Office fax:            +36 (1) 327-74-20
Mobile phone:       +36 (20) XXX-XXX
E-mail:                 Zoltan_Mozes at epam.com <mailto:Zoltan_Mozes at epam.com> 

http://www.epam.com <http://www.epam.com> 

CONFIDENTIALITY CAUTION AND DISCLAIMER
This message is intended only for the use of the individual(s) or entity(ies) to which it is addressed and contains information that is legally privileged and confidential. If you are not the intended recipient, or the person responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. All unintended recipients are obliged to delete this message and destroy any printed copies.

________________________________

From: javalist-bounces at javagrund.hu [mailto:javalist-bounces at javagrund.hu] On Behalf Of Maglódszki Viktor
Sent: Wednesday, February 07, 2007 3:02 PM
To: java list
Subject: [Java lista] tombok kulonbsege

 

Sziasztok !

 

Gondolom egy egyszerű dolog, amit nem tudok.

Sajnos most egyéb okok miatt nem tudom a guglit igénybe venni.

Adott 2db HashMap szeretném szintén 1 HashMap-ben tárolni az előző 2 különbségét.

Valami kivonás művelet létezik ?

Ha nem ebben a tipusban, akkor esetleg másikban ? (Vector,Hashtable..)

Előre is köszi, pls ne linket küldjetek mert most a webes elérésem egyéb okok miatt igencsak korlátozott.

 

üdv 

  MV

--------- következő rész ---------
Egy csatolt HTML állomány át lett konvertálva...
URL: http://javagrund.hu/pipermail/javalist/attachments/20070207/01002680/attachment-0001.html 


További információk a(z) Javalist levelezőlistáról