> From: news [mailto:[EMAIL PROTECTED] On Behalf Of Leo Simons
>
> +1. That's what the collection APIs do, innit?
 
Not really:

    Set set = new HashSet ();

    assertTrue( !set.contains(null) );
    set.add( null );
    assertTrue( set.contains(null) );
    
    Map map = new HashMap ();
    assertTrue( !map.containsKey(null) );
    assertTrue( map.get(null) == null );
    
    map.put( null, null );
    assertTrue( map.containsKey(null) );
    assertTrue( map.get(null) == null );

get() will still give you null, but containsKey will return true.

/LS


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to