tmf: Fix most Number unboxing problems
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core / src / org / eclipse / linuxtools / tmf / core / filter / model / TmfFilterAndNode.java
index 71559a555baf124646338907ef3ba18ab1735437..8ad2d91cd32e8fc08fb93ada29d8fd39910c18fd 100644 (file)
@@ -1,90 +1,90 @@
-/*******************************************************************************\r
- * Copyright (c) 2010 Ericsson\r
- *\r
- * All rights reserved. This program and the accompanying materials are\r
- * made available under the terms of the Eclipse Public License v1.0 which\r
- * accompanies this distribution, and is available at\r
- * http://www.eclipse.org/legal/epl-v10.html\r
- *\r
- * Contributors:\r
- *   Patrick Tasse - Initial API and implementation\r
- *******************************************************************************/\r
-\r
-package org.eclipse.linuxtools.tmf.core.filter.model;\r
-\r
-import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;\r
-\r
-\r
-/**\r
- * Filter node for the 'and' operation\r
- *\r
- * @version 1.0\r
- * @author Patrick Tasse\r
- */\r
-@SuppressWarnings("javadoc")\r
-public class TmfFilterAndNode extends TmfFilterTreeNode {\r
-\r
-       public static final String NODE_NAME = "AND"; //$NON-NLS-1$\r
-       public static final String NOT_ATTR = "not"; //$NON-NLS-1$\r
-\r
-       private boolean fNot = false;\r
-\r
-       /**\r
-        * @param parent the parent node\r
-        */\r
-       public TmfFilterAndNode(ITmfFilterTreeNode parent) {\r
-               super(parent);\r
-       }\r
-\r
-       /**\r
-        * @return the NOT state\r
-        */\r
-       public boolean isNot() {\r
-               return fNot;\r
-       }\r
-\r
-       /**\r
-        * @param not the NOT state\r
-        */\r
-       public void setNot(boolean not) {\r
-               this.fNot = not;\r
-       }\r
-\r
-       @Override\r
-       public String getNodeName() {\r
-               return NODE_NAME;\r
-       }\r
-\r
-       @Override\r
-       public boolean matches(ITmfEvent event) {\r
-               for (ITmfFilterTreeNode node : getChildren()) {\r
-                       if (! node.matches(event)) {\r
-                               return false ^ fNot;\r
-                       }\r
-               }\r
-               return true ^ fNot;\r
-       }\r
-\r
-       @Override\r
-       public String toString() {\r
-               StringBuffer buf = new StringBuffer();\r
-               if (fNot) {\r
-                       buf.append("not "); //$NON-NLS-1$\r
-               }\r
-               if (getParent() != null && !(getParent() instanceof TmfFilterRootNode) && !(getParent() instanceof TmfFilterNode)) {\r
-                       buf.append("( "); //$NON-NLS-1$\r
-               }\r
-               for (int i = 0; i < getChildrenCount(); i++) {\r
-                       ITmfFilterTreeNode node = getChildren()[i];\r
-                       buf.append(node.toString());\r
-                       if (i < getChildrenCount() - 1) {\r
-                               buf.append(" and "); //$NON-NLS-1$\r
-                       }\r
-               }\r
-               if (getParent() != null && !(getParent() instanceof TmfFilterRootNode) && !(getParent() instanceof TmfFilterNode)) {\r
-                       buf.append(" )"); //$NON-NLS-1$\r
-               }\r
-               return buf.toString();\r
-       }\r
-\r
-}\r
+/*******************************************************************************
+ * Copyright (c) 2010, 2012 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Patrick Tasse - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.tmf.core.filter.model;
+
+import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
+
+
+/**
+ * Filter node for the 'and' operation
+ *
+ * @version 1.0
+ * @author Patrick Tasse
+ */
+@SuppressWarnings("javadoc")
+public class TmfFilterAndNode extends TmfFilterTreeNode {
+
+       public static final String NODE_NAME = "AND"; //$NON-NLS-1$
+       public static final String NOT_ATTR = "not"; //$NON-NLS-1$
+
+       private boolean fNot = false;
+
+       /**
+        * @param parent the parent node
+        */
+       public TmfFilterAndNode(ITmfFilterTreeNode parent) {
+               super(parent);
+       }
+
+       /**
+        * @return the NOT state
+        */
+       public boolean isNot() {
+               return fNot;
+       }
+
+       /**
+        * @param not the NOT state
+        */
+       public void setNot(boolean not) {
+               this.fNot = not;
+       }
+
+       @Override
+       public String getNodeName() {
+               return NODE_NAME;
+       }
+
+       @Override
+       public boolean matches(ITmfEvent event) {
+               for (ITmfFilterTreeNode node : getChildren()) {
+                       if (! node.matches(event)) {
+                               return false ^ fNot;
+                       }
+               }
+               return true ^ fNot;
+       }
+
+       @Override
+       public String toString() {
+               StringBuffer buf = new StringBuffer();
+               if (fNot) {
+                       buf.append("not "); //$NON-NLS-1$
+               }
+               if (getParent() != null && !(getParent() instanceof TmfFilterRootNode) && !(getParent() instanceof TmfFilterNode)) {
+                       buf.append("( "); //$NON-NLS-1$
+               }
+               for (int i = 0; i < getChildrenCount(); i++) {
+                       ITmfFilterTreeNode node = getChildren()[i];
+                       buf.append(node.toString());
+                       if (i < getChildrenCount() - 1) {
+                               buf.append(" and "); //$NON-NLS-1$
+                       }
+               }
+               if (getParent() != null && !(getParent() instanceof TmfFilterRootNode) && !(getParent() instanceof TmfFilterNode)) {
+                       buf.append(" )"); //$NON-NLS-1$
+               }
+               return buf.toString();
+       }
+
+}
This page took 0.027442 seconds and 5 git commands to generate.