🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.java
Article #141658

Re: pobieranie nula z hashmapy

#141658
From: Brzezi
Date: Thu, 16 Oct 2008 08:48
24 lines
1775 bytes
czw, 16 paź 2008 o 12:07 GMT, pluton napisał(a):

> Mam hashMap<String,Double> i pobieram
> iloraz=hmFiles.get(key);
> 
> Problem w tym, że key nie istnieje. Jak zbadac
> 
> if (iloraz == null ) ?
> 
> (pokretnie to opisalem, ale mam nadzieje, ze wiadomo o co biega )

Zastanawiam sie dlaczego ludzie nie zagladaja do dokumentacji? Ciekawe czy
jestes w stanie odpowiedziec na takie proste pytanie? hehe :)

w dokumentacji do klasy HashMap, jest pewna metoda, jak zajrzysz to szybko
ja znajdziejsz, ktora ma taki opis:
"Returns true if this map contains a mapping for the specified key."

Pozdrawiam
	Brzezi
-- 
[    E-mail: brzezi@enter.net.pl ][                                           ]
[       Ekg: #3781111            ][                 Password:                 ]
[ LinuxUser: #249916             ][                                           ]
Technical Details
Message-ID: <slrn.pl.gfe56l.gsc.usunto.brzezi@localhost.localdomain>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!newsfeed.pionier.net.pl!news.astercity.net!newsfeed.atman.pl!not-for-mail
References: <gd73pg$e1f$1@inews.gazeta.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!newsfeed.pionier.net.pl!news.astercity.net!newsfeed.atman.pl!not-for-mail
From: Brzezi <usunto.brzezi@enter.net.pl>
Newsgroups: pl.comp.lang.java
Subject: Re: pobieranie nula z hashmapy
Date: Thu, 16 Oct 2008 08:48:47 +0000 (UTC)
Organization: Hard Core Slrn-pl User
Lines: 24
Message-ID: <slrn.pl.gfe56l.gsc.usunto.brzezi@localhost.localdomain>
References: <gd73pg$e1f$1@inews.gazeta.pl>
NNTP-Posting-Host: chello089077080110.chello.pl
Mime-Version: 1.0
X-Trace: node1.news.atman.pl 1224146927 26698 89.77.80.110 (16 Oct 2008 08:48:47 GMT)
X-Complaints-To: usenet@atman.pl
NNTP-Posting-Date: Thu, 16 Oct 2008 08:48:47 +0000 (UTC)
X-Licznik: 9207
User-Agent: slrn/0.9.7.4 (pl-1.4.3) (Linux/2.6.24-19-generic (i686))
X-NNTP-Posting-Host: localhost.localdomain
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit