Really?<p><pre><code>  class Widget {...}

  class final NullWidget extends Widget {
    static NULL_WIDGET = new NullWidget();
    ...
  }

  class WidgetMap extends HashMap&lt;String,Widget&gt; {
    Widget get( String key ) { 
      if( contains( key )) { return super.get( key ); }
      return NULL_WIDGET;
    }
    ...
  }</code></pre>