Code example for ResourceBundle

Methods: getObject

0
            private HashMap mappings;
 
            public boolean containsKey(Object key) {
                if (key == null)
                    return false; 
                return bundle.getObject(key.toString()) != null;
            } 
 
            public Object get(Object key) {
                if (key == null)
                    return null; 
                try { 
                    return bundle.getObject(key.toString());
                } catch (MissingResourceException ex) {
                    return "???" + key + "???";
                } 
            } 
 
            public Set keySet() {
                return getMappings().keySet();
            }