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