public Key insert(Object[] args) { return new Key(null, this.bundles, getLocale(), args); }
/** * Accepts objects and uses their string value as the key. * @param key key * @return Key object */ public Key get(String key) { return new Key(key, this.bundles, getLocale(), null); }
/** * Lists available keys * @return keys list */ public List<String> getKeys() { return getKeys(null, this.bundles, getLocale()); }
public Key bundle(String bundle) { return new Key(null, new String[] { bundle }, getLocale(), null); }
/** * Retrieves the {@link ResourceBundle} for the specified baseName * and locale, if such exists. If the baseName or locale is null * or if the locale argument cannot be converted to a {@link Locale}, * then this will return null. * @param baseName base name * @param loc locale * @return resource bundle */ protected ResourceBundle getBundle(String baseName, Object loc) { Locale locale = (loc == null) ? getLocale() : toLocale(loc); if (baseName == null || locale == null) { return null; } return ResourceBundle.getBundle(baseName, locale); }
Locale locale = (loc == null) ? getLocale() : toLocale(loc); if (locale == null || bundles == null || bundles.length == 0)