added methods for getting Boolean, String, Double and int
This commit is contained in:
@@ -22,10 +22,22 @@ public class Resources {
|
|||||||
* @throws java.util.MissingResourceException if no object for the given key can be found
|
* @throws java.util.MissingResourceException if no object for the given key can be found
|
||||||
* @throws ClassCastException if the object found for the given key is not a string
|
* @throws ClassCastException if the object found for the given key is not a string
|
||||||
*/
|
*/
|
||||||
public static String lookup(String key) {
|
public static String stringLookup(String key) {
|
||||||
return BUNDLE.getString(key);
|
return BUNDLE.getString(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static int intLookup(String key) {
|
||||||
|
return Integer.parseInt(BUNDLE.getString(key));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean boolLookup(String key) {
|
||||||
|
return Boolean.parseBoolean(BUNDLE.getString(key));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static double doubleLookup(String key) {
|
||||||
|
return Double.parseDouble(BUNDLE.getString(key));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Private constructor to prevent instantiation.
|
* Private constructor to prevent instantiation.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user