item.setFilter(filter);
itemsMap.put(key, filter);
}
public FileFilter getFilter(String key) {
FileFilter filter = null;
FileFilter parentFilter = null;
StringTokenizer tokenizer = new StringTokenizer(key, separator);
FileFilterTreeItem item = root;
while (tokenizer.hasMoreTokens()) {
String token = tokenizer.nextToken();
parentFilter = filter;
FileFilterTreeItem children = item.getChildren(token);
if (children == null) {
return parentFilter;
}
FileFilter childFilter = children.getFilter();
if (childFilter != null) {
filter = childFilter;
}
item = children;
}