Code example for ResourceBundle

Methods: getObject

0
 */ 
public class CheckResourceBundle { 
 
    private static boolean bundleContains(ResourceBundle b, String key) {
	try { 
	    b.getObject(key);
	} 
	catch (MissingResourceException e) {
	    return false; 
	} 
	return true; 
    } 
 
    /** 
     * check that no key is entered twice 
     * 
     * @param b the resourcebundle 
     */ 
    public static void checkNoDuplicates(ResourceBundle b) {
        Set<Object> set = new HashSet<Object>();
        for (Enumeration e = b.getKeys();