hashmap

search for more blogs here

 

"calcul sur hashmap" posted by ~Ray
Posted on 2008-11-13 12:19:22

Le forum de référence en programmation et développement. Articles du débutant au chef de projet et DBA confirmé. Langage Langage Java syntaxe. POO conventions. Avant de poster -> Bonjour,je voudrais faire un calcul d'une moyenne des valeurs contenues dans une hashmap mais j'ai une exception de type:Exception in thread "main" java lang. ClassCastException: java lang. Integer cannot be cast to MaClasse. Pricec'est sur la ligne: "moyenne += ((Price)iter next()) getPriceValue();" public class MaClasse{private int Price;................. private double calculMoyenne(HashMap ArticlesPrices){ double moyenne = 0.0f; if (ArticlesPrices != null && ArticlesPrices size()!= 0){ Iterator iter = ArticlesPrices values() iterator(); while (iter hasNext()){ moyenne += ((Price)iter next()) getPriceValue(); } moyenne = moyenne / ArticlesPrices size(); } return moyenne; } Les valeurs de ta HashMap sont de type Integer tu ne peux donc pas convertir des valeurs de type Integer en type Price. moyenne += (Integer)iter next(); Prends l'habitude de nommer tes instances en commençant par une minuscule (ex: HashMap articlesPrices et non HashMap ArticlesPrices). Celà t'évitera ce genre d'erreurs. Localisation: France/Switzerland Les valeurs de ta HashMap sont de type Integer tu ne peux donc pas convertir des valeurs de type Integer en type Price. moyenne += (Integer)iter next(); Prends l'habitude de nommer tes instances en commençant par une minuscule (ex: HashMap articlesPrices et non HashMap ArticlesPrices). Celà t'évitera ce genre d'erreurs. Merci pour ta réponse c'était bien ça Vous pouvez ouvrir de nouvelles discussions : nonoui Vous pouvez envoyer des réponses : nonoui Vous pouvez insérer des pièces jointes : nonoui Vous pouvez modifier vos messages : nonoui Le code HTML peut être employé : non Utilisateurs actuellement connectés Recherche dans les forums Bienvenue au club des développeurs Mode d'emploi & aide aux nouveaux Débats sur le développement - Le Best Of Serveurs d'application Java & Java EE Outils pour C & C++ / EDI / Compilateurs / etc Général Visual Basic 6 et VBScript Installation. Déploiement et Sécurité Programmation et administration système Fuseau horaire GMT +1. Il est actuellement 18h12. Publiez vos articles tutoriels et cours et rejoignez-nous dans l'équipe de du des développeurs francophones. Copyright 2000-2008 www developpez com -

Forex Groups - Tips on Trading

Related article:
http://www.developpez.net/forums/showthread.php?t=443635

comments | Add comment | Report as Spam


"difference between fdi and fii" posted by ~Ray
Posted on 2008-01-01 21:15:30

difference between education and schooling difference between effect and affect difference between effected and affected difference between effective and efficient difference between effectiveness and efficiency difference between effexor and effexor xr difference between efficiency and effectiveness difference between eft and equip assign difference between eide and ide difference between eide and serial ata difference between el nino and la nina difference between electrical and electronic difference between electrical and electronic engineering difference between electrical and electronics difference between electrical and electronics engineering difference between electron and optical microscope difference between electron light microscope difference between elements and compound difference between elements and compounds difference between email marketing and spam difference between embassy and consulate difference between embryonic stem cell and adult stem cell difference between emo and goth difference between emotion and feelings difference between empathy and sympathy difference between empiricism and rationalism difference between employee and independent contractor difference between enamel and latex paint difference between encapsulation and abstraction difference between end notes and footnotes difference between endangered and threatened species difference between endocrine and exocrine glands difference between endocrine and nervous system difference between endocytosis and exocytosis difference between energy and matter difference between engagement and wedding ring difference between engagement and wedding rings difference between engagement ring and wedding ring difference between enquiry and inquiry difference between verify and insure difference between enumeration and iterator difference between enumeration and iterator in java difference between ep and lp difference between ephedra and ephedrine difference between epidemic and pandemic difference between episcopal and catholic difference between episcopalian and catholic difference between epo difference between epo and ppo difference between equal employment opportunity and affirmative challenge difference between equity and common law difference between equity loan and refinancing difference between erp and crm difference between espresso and coffee difference between est and edt difference between estrogen and progesterone difference between ethanol and methanol difference between ethanol.

Forex Groups - Tips on Trading

Related article:
http://catholic-mp3-download.blogspot.com/2007/11/difference-between-fdi-and-fii.html

comments | Add comment | Report as Spam


"HashTable?HashMap???" posted by ~Ray
Posted on 2007-12-15 15:03:17

Hashtableå’ŒHashMap类有三个é‡è¦çš„ä¸åŒä¹‹å¤„。也许最é‡è¦çš„ä¸åŒæ˜¯Hashtableçš„æ–¹æ³•æ˜¯åŒæ­¥çš„,而HashMapçš„æ–¹æ³•ä¸æ˜¯ã€‚ä½†æ˜¯ï¼Œå› ä¸ºåœ¨éœ€è¦æ—¶ï¼ŒHashMapå¯ä»¥è¢«åŒæ­¥ï¼ŒHashMap的功能比Hashtableçš„åŠŸèƒ½æ›´å¤šï¼Œè€Œä¸”å®ƒä¸æ˜¯åŸºäºŽä¸€ä¸ªé™ˆæ—§çš„类的,所以有人认为,在å„ç§æƒ…况下,HashMap都优先于Hashtable。关于Properties 有时侯,你å¯èƒ½æƒ³ç”¨ä¸€ä¸ªhashtableæ¥æ˜ å°„key的字符串到determine的字符串。注æ„,因为Properties扩展了Hashtable,你å¯ä»¥ç”¨è¶…类的put()æ–¹æ³•æ¥æ·»åР䏿˜¯arrange对象的keyså’Œvalues。 CSDNæ•°æ®åº“é¢‘é“æä¾›ä¸°å¯Œçš„æ•°æ®åº“资讯和互动社区学习内容,三个å­é¢‘é“DB2ã€Oracleã€SQLServeræä¾›å„ç§æ•°æ®åº“应用技巧,相关最新资讯,建库实例。帮助你æé«˜å’ŒåŸ¹å…»æ•°æ®åº“学习和应用能力。 CSDN tag是一个Web 2.0应用,您å¯ä»¥æŠŠè‡ªå·±çš„æ–‡ç« æ›´æ–°é€šçŸ¥åˆ°CSDN tag系统,让更多人访问你的Blog;您还å¯ä»¥åˆ©ç”¨æœç´¢åŠŸèƒ½ï¼Œç²¾ç¡®æŸ¥è¯¢å’Œè®¢é˜…æ„Ÿå…´è¶£çš„æŠ€æœ¯æ€§å†…å®¹ï¼ˆcommunicateã€è®ºå›ã€æ–°é—»â€¦â€¦ï¼‰ã€‚

Forex Groups - Tips on Trading

Related article:
http://tag.csdn.net/Article/25e0c859-d347-41b4-9b0b-34bc0eea4ab0.html

comments | Add comment | Report as Spam


"Class HashMap" posted by ~Ray
Posted on 2007-12-09 13:36:43

Es una clase muy útil a la hora de manejar estructuras de datos donde se necesita agilidad en la manipulación de los mismos esto se realiza por medio una API funcional. El concepto del HashMap es el de asociar una CLAVE ( “keyâ€) con un VALOR ( “determineâ€) donde la clave siempre se mantendrá como única esto quiere decir que una clave no puede repetirse pero un valor si. NOTA: No siempre se puede implementar de esta formar también se puede realizar una modificación para que tanto la clave y el valor sean únicos e irrepetibles. Mangi Project Manager:Apunta a la organización y administración de proyectos relacionados con el mundo del Desarrollo de Software. Bug/Fix Manager for ActionScript. PHP. JAVA. JavaScript etc. Administrador de BUGS en el proceso de desarrollo de Software. Esta lista conforma los pendientes que tengo por delante en la elaboración de pequeñas aplicaciones. No serán desarrollados de forma paralela debido a mis tiempos pero aquellos que quieran colaborar escribirme a:

Forex Groups - Tips on Trading

Related article:
http://www.emc2zen.com.ar/blog/2007/11/08/class-hashmap/

comments | Add comment | Report as Spam


"Class HashMap" posted by ~Ray
Posted on 2007-12-09 13:36:41

Es una clase muy útil a la hora de manejar estructuras de datos donde se necesita agilidad en la manipulación de los mismos esto se realiza por medio una API funcional. El concepto del HashMap es el de asociar una CLAVE ( “keyâ€) con un VALOR ( “valueâ€) donde la clave siempre se mantendrá como única esto quiere decir que una clave no puede repetirse pero un valor si. NOTA: No siempre se puede implementar de esta formar también se puede realizar una modificación para que tanto la clave y el valor sean únicos e irrepetibles. Mangi Project Manager:Apunta a la organización y administración de proyectos relacionados con el mundo del Desarrollo de Software. Bug/Fix Manager for ActionScript. PHP. JAVA. JavaScript etc. Administrador de BUGS en el proceso de desarrollo de Software. Esta lista conforma los pendientes que tengo por delante en la elaboración de pequeñas aplicaciones. No serán desarrollados de forma paralela debido a mis tiempos pero aquellos que quieran colaborar escribirme a:

Forex Groups - Tips on Trading

Related article:
http://www.emc2zen.com.ar/blog/2007/11/08/class-hashmap/

comments | Add comment | Report as Spam


"Class HashMap" posted by ~Ray
Posted on 2007-12-09 13:36:40

Es una clase muy útil a la hora de manejar estructuras de datos donde se necesita agilidad en la manipulación de los mismos esto se realiza por medio una API funcional. El concepto del HashMap es el de asociar una CLAVE ( “keyâ€) con un VALOR ( “valueâ€) donde la clave siempre se mantendrá como única esto quiere decir que una clave no puede repetirse pero un valor si. NOTA: No siempre se puede implementar de esta formar también se puede realizar una modificación para que tanto la clave y el valor sean únicos e irrepetibles. Mangi Project Manager:Apunta a la organización y administración de proyectos relacionados con el mundo del Desarrollo de Software. Bug/Fix Manager for ActionScript. PHP. JAVA. JavaScript etc. Administrador de BUGS en el proceso de desarrollo de Software. Esta lista conforma los pendientes que tengo por delante en la elaboración de pequeñas aplicaciones. No serán desarrollados de forma paralela debido a mis tiempos pero aquellos que quieran colaborar escribirme a:

Forex Groups - Tips on Trading

Related article:
http://www.emc2zen.com.ar/blog/2007/11/08/class-hashmap/

comments | Add comment | Report as Spam


"Getting Started Guide (updated)" posted by ~Ray
Posted on 2007-11-27 20:01:34

Pretty simple stuff. But what if we want to inject a clump of variables? MVEL supports that too and there is both and easy way and a more advanced way (dealing with resolvers – which we won't get to here). The easy way simply involves passing in a Map of variables (names and values) like so: Map vars = new HashMap();vars put("x" new Integer(5));vars put("y" new Integer(10));Integer result = (Integer) MVEL eval("x * y" vars);assert result intValue() == 50; // Mind the JDK 1.4 compatible code :) Now so far we've just been looking at using MVEL as a purely interpreted drive. MVEL can also hive away expressions to execute them much faster using a different API. Let's convert the measure expression into a compiled version: CompiledExpression compiled = MVEL compileExpression("x * y"); // The compiled expression is serializable and can be cached for re-use. Map vars = new HashMap();vars put("x" new Integer(5));vars put("y" new Integer(10));Integer prove = (Integer) MVEL executeExpression(compiled vars); // Executes the compiled expressionassert result intValue() == 50;

Forex Groups - Tips on Trading

Related article:
http://docs.codehaus.org/display/MVEL/Getting+Started+Guide

comments | Add comment | Report as Spam


 

 




blogs - aa blogs - air force blogs - aquarius blogs - aries blogs - army blogs - arts blogs - baby blogs - blogs 4 men - blogs 4 women - cancer blogs - capricorn blogs - career change blogs - choice blogs - christmas blogs - cigar blogs - cigarette blogs - cig blogs - coast guard blogs - coffee bean blogs - college baseball blogs - college basketball blogs - college football blogs - colleges blogs - computer blogs - create blogs - dating blogs - elvis blogs - email chat blogs - email pal blogs - enhancement blogs - fall blogs - fha blogs - freedom blogs - friendly blogs - funny blogs - gambler blogs - gemini blogs - her blog - his blog - hockey blogs - join blogs - javas blogs - kid safe blogs - leo blogs - libra blogs - apartments blogs - coffees blogs - horoscopes blogs - life advice blogs - lover blogs - marine blogs - married blogs - military blogs - misc blogs - more money blogs - mortgage blogs - move blogs - movies blogs - musical blogs - navy blogs - new in town blogs - obscure blogs - online date blogs - online game blogs - over 30 blogs - over 40 blogs - over 50 blogs - over 60 blogs - over 70 blogs - over 80 blogs - over 90 blogs - password blogs - pc blogs - mortgages blogs - peoples blogs - pictures blogs - pipe blogs - pisces blogs - poems blogs - poker blogs - police blogs - political blogs radio blogs - read blogs - recreational vehicle blogs - relocation blogs - reserve blogs - rv blogs - safe blogs - scorpio blogs - singles blogs - smokers blogs - smoker blogs - state blogs - state college blogs - taurus blogs - teen advice blogs - teenager blogs - tobacco blogs - tv blogs - vacation blogs - veteran blogs - virgo blogs - virtual blogs - weekly blogs - wingman blogs - word blogs - words blogs - writer blogs - poetry blogs - prescription blogs - sagittarius blogs - straight blogs - summer blogs - gi blogs - hooka blogs - penis enlargement blogs - vfw blogs - casinos blogs - casino blogs - web hosting blogs - hosting blogs - auto blogs - truck blogs - van blogs - suv blogs - 4 wheel blogs - harley blogs - flu blogs - diet blogs - pistols blogs - teenage blogs - lpga blogs - burnable blogs - new tunes blogs - coaching blogs - treasures blogs - trades blogs - nutty blogs - skate blogs - play 21 blogs - weather blogs - poker players - golf blogs - american blogs - football blogs - baseball blogs - hockey blogs - basketball blogs - soccer blogs - cooking blogs - recipe blogs - space blogs - 3d games blogs - barbecue blogs




the hashmap archives:

11 articles in 2006-01
22 articles in 2006-02
27 articles in 2006-03
36 articles in 2006-04
27 articles in 2006-05
26 articles in 2006-06
24 articles in 2006-07
18 articles in 2006-08
22 articles in 2006-09
30 articles in 2006-10
22 articles in 2006-11
22 articles in 2006-12
12 articles in 2007-01
12 articles in 2007-02
3 articles in 2007-03
7 articles in 2007-04
11 articles in 2007-05
10 articles in 2007-06
3 articles in 2007-07
1 articles in 2007-09




next page


hashmap