view dwtx/dwtxhelper/JHashMap.d @ 49:115258985f10

JHashMapT into FontRegistry
author Frank Benoit <benoit@tionex.de>
date Fri, 11 Apr 2008 16:31:18 +0200
parents
children
line wrap: on
line source

module dwtx.dwtxhelper.JHashMap;

import tango.util.collection.HashMap;
import tango.core.Traits;

class JHashMapT(K,V) : HashMap!(K,V) {
    this(){
        super();
    }

    static if( is(V==class) || is(V==interface) || isDynamicArrayType!(V) ){
        public V find( K key ){
            if( containsKey(key) ){
                return get(key);
            }
            return null;
        }
    }
}

alias JHashMapT!(Object,Object) JHashMap;