|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.mapreduce.util.ResourceBundles
public class ResourceBundles
Helper class to handle resource bundles in a saner way
Constructor Summary | |
---|---|
ResourceBundles()
|
Method Summary | ||
---|---|---|
static java.util.ResourceBundle |
getBundle(java.lang.String bundleName)
Get a resource bundle |
|
static java.lang.String |
getCounterGroupName(java.lang.String group,
java.lang.String defaultValue)
Get the counter group display name |
|
static java.lang.String |
getCounterName(java.lang.String group,
java.lang.String counter,
java.lang.String defaultValue)
Get the counter display name |
|
static
|
getValue(java.lang.String bundleName,
java.lang.String key,
java.lang.String suffix,
T defaultValue)
Get a resource given bundle name and key |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResourceBundles()
Method Detail |
---|
public static java.util.ResourceBundle getBundle(java.lang.String bundleName)
bundleName
- of the resource
java.util.MissingResourceException
public static <T> T getValue(java.lang.String bundleName, java.lang.String key, java.lang.String suffix, T defaultValue)
T
- type of the resourcebundleName
- name of the resource bundlekey
- to lookup the resourcesuffix
- for the key to lookupdefaultValue
- of the resource
java.lang.ClassCastException
- if the resource found doesn't match Tpublic static java.lang.String getCounterGroupName(java.lang.String group, java.lang.String defaultValue)
group
- the group name to lookupdefaultValue
- of the group
public static java.lang.String getCounterName(java.lang.String group, java.lang.String counter, java.lang.String defaultValue)
group
- the counter group name for the countercounter
- the counter name to lookupdefaultValue
- of the counter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |