Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/filters/FilterStatistic.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/filter/FilterStatistic.java	(revision 1036)
+++ 	(revision )
@@ -1,49 +1,0 @@
-package de.ugoe.cs.autoquest.usability.tasktree.filter;
-
-import java.util.List;
-
-import com.google.common.base.Predicate;
-import com.google.common.collect.Lists;
-
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode;
-
-public class FilterStatistic {
-    
-    @SuppressWarnings("rawtypes")
-    private final Predicate filterPredicate;
-
-    private List<ITaskTreeNode> filteredNodes = Lists.newArrayList();
-    
-    private List<ITaskTreeNode> nodesNotMatchedFilter = Lists.newArrayList();
-    
-    @SuppressWarnings("rawtypes")
-    public FilterStatistic(Predicate filterPredicate) {
-        this.filterPredicate = filterPredicate;
-    }
-    
-    @SuppressWarnings("unchecked")
-    public void addNode(ITaskTreeNode node) {
-        if (filterPredicate.apply(node)) {
-            filteredNodes.add(node);
-        } else {
-            nodesNotMatchedFilter.add(node);
-        }
-    }
-    
-    public List<ITaskTreeNode> nodesMatchedFilter() {
-        return this.filteredNodes;
-    }
-    
-    public int nrOfNodesMatchedFilter() {
-        return this.filteredNodes.size();
-    }
-    
-    public List<ITaskTreeNode> nodesNotMatchedFilter() {
-        return this.nodesNotMatchedFilter;
-    }
-    
-    public int nrOfNodesNotMatchedFilter() {
-        return this.nodesNotMatchedFilter.size();
-    }
-    
-}
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/filters/FilterStatisticCache.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/filter/FilterStatisticCache.java	(revision 1036)
+++ 	(revision )
@@ -1,38 +1,0 @@
-package de.ugoe.cs.autoquest.usability.tasktree.filter;
-
-import java.util.concurrent.TimeUnit;
-
-import com.google.common.base.Optional;
-import com.google.common.cache.Cache;
-import com.google.common.cache.CacheBuilder;
-
-public class FilterStatisticCache {
-
-    private static final FilterStatisticCache instance = new FilterStatisticCache();
-    
-    @SuppressWarnings("rawtypes")
-    private Cache<TaskTreeNodeFilter, FilterStatistic> cache;
-    
-    private FilterStatisticCache() {
-        this.cache = CacheBuilder.newBuilder().expireAfterWrite(10, TimeUnit.MINUTES).build();
-    }
-    
-    public static FilterStatisticCache instance() {
-        return instance;
-    }
-    
-    @SuppressWarnings("rawtypes")
-    public void addFilterStatistic(TaskTreeNodeFilter nodeFilter, FilterStatistic filterStatistic) {
-        this.cache.put(nodeFilter, filterStatistic);
-    }
-    
-    @SuppressWarnings("rawtypes")
-    public Optional<FilterStatistic> getFilterStatistic(TaskTreeNodeFilter nodeFilter) {
-        return Optional.fromNullable(this.cache.getIfPresent(nodeFilter));
-    }
-    
-    public void clear() {
-        this.cache.invalidateAll();
-    }
-    
-}
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/filters/IterativeDFSFilterStrategy.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/filter/IterativeDFSFilterStrategy.java	(revision 1036)
+++ 	(revision )
@@ -1,59 +1,0 @@
-package de.ugoe.cs.autoquest.usability.tasktree.filter;
-
-import java.util.Stack;
-
-import com.google.common.base.Predicate;
-
-import de.ugoe.cs.autoquest.eventcore.IEventTarget;
-import de.ugoe.cs.autoquest.eventcore.IEventType;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTree;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode;
-
-public class IterativeDFSFilterStrategy implements TaskTreeFilterStrategy {
-    
-    private FilterStatistic filterStatistic;
-    
-    @SuppressWarnings("unchecked")
-    @Override
-    public FilterStatistic filter(ITaskTree taskTree, EventTargetFilter eventTarget) {
-        Predicate<IEventTarget> filterPredicate = eventTarget.filterPredicate();
-        this.filterStatistic = new FilterStatistic(filterPredicate);
-        traverse(taskTree);
-        return this.filterStatistic;
-    }
-
-    @SuppressWarnings("unchecked")
-    @Override
-    public FilterStatistic filter(ITaskTree taskTree, EventTypeFilter eventType) {
-        Predicate<IEventType> filterPredicate = eventType.filterPredicate();
-        this.filterStatistic = new FilterStatistic(filterPredicate);
-        traverse(taskTree);
-        return this.filterStatistic;
-    }
-    
-    private void traverse(ITaskTree taskTree) {
-        Stack<ITaskTreeNode> unvisitedNodes = new Stack<ITaskTreeNode>();
-        unvisitedNodes.push(taskTree.getRoot());
-        while(stillUnvisitedNodes(unvisitedNodes)) {
-            ITaskTreeNode node = unvisitedNodes.pop();
-            processCurrentNode(node);
-            processChildrenOfCurrentNode(unvisitedNodes, node);
-        }
-    }
-
-    private boolean stillUnvisitedNodes(Stack<ITaskTreeNode> unvisitedNodes) {
-        return !unvisitedNodes.isEmpty();
-    }
-
-    private void processCurrentNode(ITaskTreeNode node) {
-        this.filterStatistic.addNode(node);
-    }
-    
-    private void processChildrenOfCurrentNode(Stack<ITaskTreeNode> unvisitedNodes,
-                                              ITaskTreeNode node) {
-        for(ITaskTreeNode child : node.getChildren()) {
-            unvisitedNodes.push(child);
-        }
-    }
-
-}
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/filters/TaskTreeFilterStrategy.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/filter/TaskTreeFilterStrategy.java	(revision 1036)
+++ 	(revision )
@@ -1,11 +1,0 @@
-package de.ugoe.cs.autoquest.usability.tasktree.filter;
-
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTree;
-
-public interface TaskTreeFilterStrategy {
-
-    public FilterStatistic filter(ITaskTree taskTree, EventTargetFilter eventTarget);
-
-    public FilterStatistic filter(ITaskTree taskTree, EventTypeFilter eventType);
-  
-}
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/filters/EventTargetFilter.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/filter/EventTargetFilter.java	(revision 1036)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/filters/EventTargetFilter.java	(revision 1135)
@@ -1,3 +1,17 @@
-package de.ugoe.cs.autoquest.usability.tasktree.filter;
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.autoquest.usability.tasktree.filters;
 
 import com.google.common.base.Function;
@@ -11,12 +25,19 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode;
 
+/**
+ * <p>
+ * TODO comment
+ * </p>
+ * 
+ * @author Alexander Deicke
+ */
 public enum EventTargetFilter implements TaskTreeNodeFilter<IEventTarget> {
 
     TEXT_FIELD(ITextField.class),
-    
+
     TEXT_AREA(ITextArea.class);
-    
+
     private Class<? extends IEventTarget> eventTargetClazz;
-    
+
     private EventTargetFilter(Class<? extends IEventTarget> eventTargetClazz) {
         this.eventTargetClazz = eventTargetClazz;
@@ -37,8 +58,8 @@
         return Predicates.and(instanceOfIEventTaskPredicate, nodeHoldsInstanceOfFilterArgument);
     }
-    
+
     private Function<ITaskTreeNode, IEventTarget> nodeExtractionFunction() {
         return new Function<ITaskTreeNode, IEventTarget>() {
-            
+
             @Override
             public IEventTarget apply(ITaskTreeNode treeNode) {
@@ -47,4 +68,4 @@
         };
     }
-    
+
 }
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/filters/EventTypeFilter.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/filter/EventTypeFilter.java	(revision 1036)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/filters/EventTypeFilter.java	(revision 1135)
@@ -1,3 +1,17 @@
-package de.ugoe.cs.autoquest.usability.tasktree.filter;
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.autoquest.usability.tasktree.filters;
 
 import com.google.common.base.Function;
@@ -6,4 +20,5 @@
 
 import de.ugoe.cs.autoquest.eventcore.IEventType;
+import de.ugoe.cs.autoquest.eventcore.gui.IInteraction;
 import de.ugoe.cs.autoquest.eventcore.gui.MouseButtonInteraction;
 import de.ugoe.cs.autoquest.eventcore.gui.MouseInteraction;
@@ -12,14 +27,23 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode;
 
+/**
+ * <p>
+ * TODO comment
+ * </p>
+ * 
+ * @author Alexander Deicke
+ */
 public enum EventTypeFilter implements TaskTreeNodeFilter<IEventType> {
+
+    MOUSE_BUTTON_INTERACTION(MouseButtonInteraction.class),
+    
+    MOUSE_INTERACTION(MouseInteraction.class),
     
     TEXT_INPUT(TextInput.class),
     
-    MOUSE_INTERACTION(MouseInteraction.class),
-    
-    MOUSE_BUTTON_INTERACTION(MouseButtonInteraction.class);
-    
+    USER_INTERACTION(IInteraction.class);
+
     private Class<? extends IEventType> eventTypeClazz;
-    
+
     private EventTypeFilter(Class<? extends IEventType> eventTypeClazz) {
         this.eventTypeClazz = eventTypeClazz;
@@ -31,5 +55,5 @@
         return (Class<IEventType>) eventTypeClazz;
     }
-    
+
     @SuppressWarnings("rawtypes")
     @Override
@@ -40,8 +64,8 @@
         return Predicates.and(instanceOfIEventTaskPredicate, nodeHoldsInstanceOfFilterArgument);
     }
-    
+
     private Function<ITaskTreeNode, IEventType> nodeExtractionFunction() {
         return new Function<ITaskTreeNode, IEventType>() {
-            
+
             @Override
             public IEventType apply(ITaskTreeNode treeNode) {
@@ -50,3 +74,3 @@
         };
     }
-    }
+}
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/filters/TaskTreeFilter.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/filter/TaskTreeFilter.java	(revision 1036)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/filters/TaskTreeFilter.java	(revision 1135)
@@ -1,13 +1,35 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
 
-package de.ugoe.cs.autoquest.usability.tasktree.filter;
+package de.ugoe.cs.autoquest.usability.tasktree.filters;
 
 import com.google.common.base.Preconditions;
 
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTree;
+import de.ugoe.cs.autoquest.usability.tasktree.FilterResult;
+import de.ugoe.cs.autoquest.usability.tasktree.TaskTreeFilterStrategy;
 
+/**
+ * <p>
+ * TODO comment
+ * </p>
+ * 
+ * @author Alexander Deicke
+ */
 public class TaskTreeFilter {
-    
+
     private final TaskTreeFilterStrategy taskTreeFilterStrategy;
-    
+
     public TaskTreeFilter(TaskTreeFilterStrategy treeTraversalStrategy) {
         Preconditions.checkNotNull(treeTraversalStrategy);
@@ -23,4 +45,8 @@
     }
 
+    public FilterNodeTypeStep filterByNodeType(TaskTreeNodeTypeFilter nodeType) {
+        return new FilterNodeTypeStep(nodeType);
+    }
+
     public class FilterEventTargetStep {
 
@@ -31,5 +57,5 @@
         }
 
-        public FilterStatistic from(ITaskTree taskTree) {
+        public FilterResult from(ITaskTree taskTree) {
             return taskTreeFilterStrategy.filter(taskTree, eventTarget);
         }
@@ -45,8 +71,22 @@
         }
 
-        public FilterStatistic from(ITaskTree taskTree) {
+        public FilterResult from(ITaskTree taskTree) {
             return taskTreeFilterStrategy.filter(taskTree, eventType);
         }
 
     }
+
+    public class FilterNodeTypeStep {
+
+        private final TaskTreeNodeTypeFilter nodeType;
+
+        public FilterNodeTypeStep(TaskTreeNodeTypeFilter nodeType) {
+            this.nodeType = nodeType;
+        }
+
+        public FilterResult from(ITaskTree taskTree) {
+            return taskTreeFilterStrategy.filter(taskTree, nodeType);
+        }
+
+    }
 }
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/filters/TaskTreeNodeFilter.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/filter/TaskTreeNodeFilter.java	(revision 1036)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/filters/TaskTreeNodeFilter.java	(revision 1135)
@@ -1,12 +1,33 @@
-package de.ugoe.cs.autoquest.usability.tasktree.filter;
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.autoquest.usability.tasktree.filters;
 
 import com.google.common.base.Predicate;
 
+/**
+ * <p>
+ * TODO comment
+ * </p>
+ * 
+ * @author Alexander Deicke
+ */
 public interface TaskTreeNodeFilter<T> {
 
     public Class<T> clazz();
-    
+
     @SuppressWarnings("rawtypes")
     public Predicate filterPredicate();
-    
+
 }
