code: public static AccrueType getInstance(String type, Locale locale)
     {
        AccrueType result = null;
  
        String[] typeNames = LocaleData.getStringArray(locale, LocaleData.ACCRUE_TYPES);
  
        for (int loop = 0; loop < typeNames.length; loop++)
        {
           if (typeNames[loop].equalsIgnoreCase(type) == true)
           {
              result = AccrueType.getInstance(loop + 1);
              break;
           }
        }
  
        if (result == null)
        {
           result = AccrueType.PRORATED;
        }
  
        return (result);
     }
docs: This method takes the textual version of an accrue type name
  and populates the class instance appropriately. Note that unrecognised
  values are treated as "Prorated".
  
  @param type text version of the accrue type
  @param locale target locale
  @return AccrueType class instance