From: Rajarshi G. <rg...@in...> - 2009-02-09 18:02:58
|
On Feb 9, 2009, at 1:00 PM, Egon Willighagen wrote: > On Mon, Feb 9, 2009 at 6:57 PM, Rajarshi Guha <rg...@in...> > wrote: >> On Feb 9, 2009, at 12:50 PM, Egon Willighagen wrote: >>> 1. we do not check symbols, so the above code will give >>> NullPointerExceptions. >> >> Apparently not, since it HashMap.get(Object) will take a null value >> (and obviously return a null) value > > I was refering to the .intValue() Oh, OK > ... what does > PeriodicTable.getAtomicNumber() return for "FooBar" then? Not null? No, it'll return null. It makes sense if atomic number can be 'configured'. if we remove the need for configuration, then it doesn't matter ------------------------------------------------------------------- Rajarshi Guha <rg...@in...> GPG Fingerprint: D070 5427 CC5B 7938 929C DD13 66A1 922C 51E7 9E84 ------------------------------------------------------------------- I'm related to people I don't relate to." -Calvin |