3 ms·
Really? class Widget {...} class final NullWidget extends Widget { static NULL_WIDGET = new NullWidget(); ... } class WidgetMap extends HashM
by specialist 11y ago
Really?
class Widget {...}
class final NullWidget extends Widget {
static NULL_WIDGET = new NullWidget();
...
}
class WidgetMap extends HashMap<String,Widget> {
Widget get( String key ) {
if( contains( key )) { return super.get( key ); }
return NULL_WIDGET;
}
...
}