public void filterValues(Map<?, String> map) {

        // For each map entry
        for (Map.Entry<?, String> entry : map.entrySet()) {

            // If value is non-null, filter value through this TokenFilter
            String value = entry.getValue();
            if (value != null)
                entry.setValue(filter(value));

        }

    }
Given an arbitrary map containing String values, replace each non-null
value with the corresponding filtered value. Any tokens present in the
values of the given map which lack defined values within this
TokenFilter will be interpreted as literals.

@param map
    The map whose values should be filtered.
guacamole-ext/src/main/java/org/apache/guacamole/token/TokenFilter.java