Adjusted filters for matching meta-fields
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core / src / org / eclipse / linuxtools / tmf / core / filter / model / TmfFilterRootNode.java
1 /*******************************************************************************
2 * Copyright (c) 2010 Ericsson
3 *
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *
9 * Contributors:
10 * Patrick Tasse - Initial API and implementation
11 *******************************************************************************/
12
13 package org.eclipse.linuxtools.tmf.core.filter.model;
14
15 import java.util.Arrays;
16 import java.util.List;
17
18 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
19
20
21 public class TmfFilterRootNode extends TmfFilterTreeNode {
22
23 public static final String NODE_NAME = "ROOT"; //$NON-NLS-1$
24
25 private static final String[] VALID_CHILDREN = {
26 TmfFilterNode.NODE_NAME
27 };
28
29 public TmfFilterRootNode() {
30 super(null);
31 }
32
33 @Override
34 public String getNodeName() {
35 return NODE_NAME;
36 }
37
38 @Override
39 public boolean matches(ITmfEvent event) {
40 for (ITmfFilterTreeNode node : getChildren()) {
41 if (! node.matches(event)) {
42 return false;
43 }
44 }
45 return true;
46 }
47
48 @Override
49 public List<String> getValidChildren() {
50 return Arrays.asList(VALID_CHILDREN);
51 }
52
53 }
This page took 0.033328 seconds and 6 git commands to generate.