Class FilterMap<K,V>

java.lang.Object
java.util.AbstractMap<K,V>
org.zkoss.util.FilterMap<K,V>
All Implemented Interfaces:
Map<K,V>

public class FilterMap<K,V> extends AbstractMap<K,V>
A map that allows the value to be evaluated before returning (so called filtering). For example, if you allow the value to have EL expressions and want to evaluate it before returning, then you could implement FilterMap.Filter to evaluate the value when the value is retrieved. Then, encapsulate the original map with this class. For example,

 return new FilterMap(map,
     new FilterMap.Filter() {
         public Object filter(Object key, Object value) {
             //evaluate the value and return the result
         }
     });

Notice that this map is readonly, and it is thread-safe if the give map and the filter are both thread safe.

Since:
5.0.7
Author:
tomyeh