public FunctionNames(Locale l) {
ResourceBundle rb = ResourceBundle.getBundle("functions", l);
Function[] allfunctions = Function.getFunctions();
names = new HashMap(allfunctions.length);
functions = new HashMap(allfunctions.length);
// Iterate through all the functions, adding them to the hash maps
Function f = null;
String n = null;
String propname = null;
for (int i = 0; i < allfunctions.length; i++)
{
f = allfunctions[i];
propname = f.getPropertyName();
n = propname.length() != 0 ? rb.getString(propname) : null;
if (n != null)
{
names.put(f, n);
functions.put(n, f);
}
}
}
Parameters:
l - the locale
|