private static Map<String,Object> buildExpressionEvaluationUtilityObjects(final Locale locale) { Map<String,Object> objects = EXPRESSION_EVALUATION_UTILITY_OBJECTS_BY_LOCALE.get(locale); if (objects == null) { objects = new HashMap<String, Object>(30); if (locale != null) { objects.put(StandardExpressionObjectFactory.CALENDARS_EXPRESSION_OBJECT_NAME, new Calendars(locale)); objects.put(StandardExpressionObjectFactory.DATES_EXPRESSION_OBJECT_NAME, new Dates(locale)); objects.put(StandardExpressionObjectFactory.NUMBERS_EXPRESSION_OBJECT_NAME, new Numbers(locale)); objects.put(StandardExpressionObjectFactory.STRINGS_EXPRESSION_OBJECT_NAME, new Strings(locale)); } objects.put(StandardExpressionObjectFactory.BOOLS_EXPRESSION_OBJECT_NAME, new Bools()); objects.put(StandardExpressionObjectFactory.OBJECTS_EXPRESSION_OBJECT_NAME, new Objects()); objects.put(StandardExpressionObjectFactory.ARRAYS_EXPRESSION_OBJECT_NAME, new Arrays()); objects.put(StandardExpressionObjectFactory.LISTS_EXPRESSION_OBJECT_NAME, new Lists()); objects.put(StandardExpressionObjectFactory.SETS_EXPRESSION_OBJECT_NAME, new Sets()); objects.put(StandardExpressionObjectFactory.MAPS_EXPRESSION_OBJECT_NAME, new Maps()); objects.put(StandardExpressionObjectFactory.AGGREGATES_EXPRESSION_OBJECT_NAME, new Aggregates()); EXPRESSION_EVALUATION_UTILITY_OBJECTS_BY_LOCALE.put(locale, objects); } return new HashMap<String, Object>(objects); }
private static Map<String,Object> buildExpressionEvaluationUtilityObjects(final Locale locale) { Map<String,Object> objects = EXPRESSION_EVALUATION_UTILITY_OBJECTS_BY_LOCALE.get(locale); if (objects == null) { objects = new HashMap<String, Object>(30); if (locale != null) { objects.put(StandardExpressionObjectFactory.CALENDARS_EXPRESSION_OBJECT_NAME, new Calendars(locale)); objects.put(StandardExpressionObjectFactory.DATES_EXPRESSION_OBJECT_NAME, new Dates(locale)); objects.put(StandardExpressionObjectFactory.NUMBERS_EXPRESSION_OBJECT_NAME, new Numbers(locale)); objects.put(StandardExpressionObjectFactory.STRINGS_EXPRESSION_OBJECT_NAME, new Strings(locale)); } objects.put(StandardExpressionObjectFactory.BOOLS_EXPRESSION_OBJECT_NAME, new Bools()); objects.put(StandardExpressionObjectFactory.OBJECTS_EXPRESSION_OBJECT_NAME, new Objects()); objects.put(StandardExpressionObjectFactory.ARRAYS_EXPRESSION_OBJECT_NAME, new Arrays()); objects.put(StandardExpressionObjectFactory.LISTS_EXPRESSION_OBJECT_NAME, new Lists()); objects.put(StandardExpressionObjectFactory.SETS_EXPRESSION_OBJECT_NAME, new Sets()); objects.put(StandardExpressionObjectFactory.MAPS_EXPRESSION_OBJECT_NAME, new Maps()); objects.put(StandardExpressionObjectFactory.AGGREGATES_EXPRESSION_OBJECT_NAME, new Aggregates()); EXPRESSION_EVALUATION_UTILITY_OBJECTS_BY_LOCALE.put(locale, objects); } return new HashMap<String, Object>(objects); }
private static Map<String,Object> computeBaseObjectsByLocale(final Locale locale) { Map<String,Object> objects = BASE_OBJECTS_BY_LOCALE_CACHE.get(locale); if (objects == null) { objects = new HashMap<String, Object>(15); if (locale != null) { objects.put(CALENDARS_EVALUATION_VARIABLE_NAME, new Calendars(locale)); objects.put(DATES_EVALUATION_VARIABLE_NAME, new Dates(locale)); objects.put(NUMBERS_EVALUATION_VARIABLE_NAME, new Numbers(locale)); objects.put(STRINGS_EVALUATION_VARIABLE_NAME, new Strings(locale)); } objects.put(BOOLS_EVALUATION_VARIABLE_NAME, new Bools()); objects.put(OBJECTS_EVALUATION_VARIABLE_NAME, new Objects()); objects.put(ARRAYS_EVALUATION_VARIABLE_NAME, new Arrays()); objects.put(LISTS_EVALUATION_VARIABLE_NAME, new Lists()); objects.put(SETS_EVALUATION_VARIABLE_NAME, new Sets()); objects.put(MAPS_EVALUATION_VARIABLE_NAME, new Maps()); objects.put(AGGREGATES_EVALUATION_VARIABLE_NAME, new Aggregates()); BASE_OBJECTS_BY_LOCALE_CACHE.put(locale, objects); } return objects; }