avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leo Sutic" <leo.su...@inspireinfrastructure.com>
Subject RE: [VOTE] DefaultConfiguration.setAttribute(String,<null>)
Date Wed, 10 Dec 2003 19:04:49 GMT


> From: news [mailto:news@sea.gmane.org] 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: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Mime
View raw message