tmf/lttng: Remove unneeded (non-Javadoc) comments
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ui / src / org / eclipse / linuxtools / tmf / ui / views / uml2sd / dialogs / FilterCriteria.java
index b9fc687604a6ee2b297235d19843cfc53b57e043..ed2d78c3546a5ff7ff5ee80d240a1e525bb70c34 100755 (executable)
@@ -1,16 +1,15 @@
 /**********************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
- * Copyright (c) 2011, 2012 Ericsson.
- * 
+ * Copyright (c) 2005, 2013 IBM Corporation, 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: 
- * IBM - Initial API and implementation
- * Bernd Hufmann - Updated for TMF
+ *
+ * Contributors:
+ *     IBM - Initial API and implementation
+ *     Bernd Hufmann - Updated for TMF
  **********************************************************************/
+
 package org.eclipse.linuxtools.tmf.ui.views.uml2sd.dialogs;
 
 import java.util.Iterator;
@@ -20,10 +19,10 @@ import org.eclipse.jface.dialogs.DialogSettings;
 
 /**
  * A filter criteria is a criteria that can be activated or not, positive or not.
- * 
+ *
  * @version 1.0
  * @author sveyrier
- * 
+ *
  */
 public class FilterCriteria {
 
@@ -35,11 +34,11 @@ public class FilterCriteria {
      */
     protected static final String ACTIVE = "active"; //$NON-NLS-1$
     /**
-     * The property value for positive filter. 
+     * The property value for positive filter.
      */
     protected static final String POSITIVE = "positive"; //$NON-NLS-1$
     /**
-     * The filter loader class name property. 
+     * The filter loader class name property.
      */
     protected static final String LOADERCLASSNAME = "loaderClassName"; //$NON-NLS-1$
 
@@ -47,51 +46,49 @@ public class FilterCriteria {
     // Attributes
     // ------------------------------------------------------------------------
     /**
-     * The criteria reference.  
+     * The criteria reference.
      */
-    protected Criteria criteria;
+    protected Criteria fCriteria;
     /**
      * Flag whether this criteria is active or not
      */
-    protected boolean active;
+    protected boolean fIsActive;
     /**
      * Flag whether this criteria is for positive filter or not
      */
-    protected boolean positive;
+    protected boolean fIsPositive;
     /**
      * The loader class name.
      */
-    protected String loaderClassName;
+    protected String fLoaderClassName;
 
     // ------------------------------------------------------------------------
     // Constructor
     // ------------------------------------------------------------------------
     /**
      * Standard constructor
-     * 
-     * @param criteria_ A criteria reference
-     * @param active_ <code>true</code> if filter criteria is active else <code>false</code> 
-     * @param positive_  <code>true</code> for positive filter else <code>false</code>
+     *
+     * @param criteria A criteria reference
+     * @param isActive <code>true</code> if filter criteria is active else <code>false</code>
+     * @param isPositive  <code>true</code> for positive filter else <code>false</code>
      */
-    public FilterCriteria(Criteria criteria_, boolean active_, boolean positive_) {
-        setCriteria(criteria_);
-        setActive(active_);
-        setPositive(positive_);
+    public FilterCriteria(Criteria criteria, boolean isActive, boolean isPositive) {
+        this(criteria, isActive, isPositive, null);
     }
 
     /**
      * Constructor
-     * 
-     * @param criteria_ A criteria reference
-     * @param active_ <code>true</code> if filter criteria is active else <code>false</code> 
-     * @param positive_  <code>true</code> for positive filter else <code>false</code>
-     * @param loaderClassName_ A loader class name
+     *
+     * @param criteria A criteria reference
+     * @param isActive <code>true</code> if filter criteria is active else <code>false</code>
+     * @param isPositive  <code>true</code> for positive filter else <code>false</code>
+     * @param loaderClassName A loader class name
      */
-    public FilterCriteria(Criteria criteria_, boolean active_, boolean positive_, String loaderClassName_) {
-        setCriteria(criteria_);
-        setActive(active_);
-        setPositive(positive_);
-        setLoaderClassName(loaderClassName_);
+    public FilterCriteria(Criteria criteria, boolean isActive, boolean isPositive, String loaderClassName) {
+        fCriteria = criteria;
+        fIsActive = isActive;
+        fIsPositive = isPositive;
+        fLoaderClassName = loaderClassName;
     }
 
     /**
@@ -99,10 +96,10 @@ public class FilterCriteria {
      * @param other FilterCriteria
      */
     public FilterCriteria (FilterCriteria other) {
-        criteria = new Criteria(other.criteria);
-        this.active = other.active;
-        this.positive = other.positive;
-        this.loaderClassName = other.loaderClassName;
+        fCriteria = new Criteria(other.fCriteria);
+        fIsActive = other.fIsActive;
+        fIsPositive = other.fIsPositive;
+        fLoaderClassName = other.fLoaderClassName;
     }
 
     /**
@@ -114,18 +111,15 @@ public class FilterCriteria {
     // ------------------------------------------------------------------------
     // Methods
     // ------------------------------------------------------------------------
-    /*
-     * (non-Javadoc)
-     * @see java.lang.Object#toString()
-     */
+
     @Override
     public String toString() {
         StringBuffer sb = new StringBuffer(super.toString());
-        sb.append(":"); //$NON-NLS-1$
-        if (criteria != null) {
-            sb.append(" expression=");sb.append(criteria.getExpression()); //$NON-NLS-1$
-            sb.append(" active=");sb.append(active); //$NON-NLS-1$
-            sb.append(" positive=");sb.append(positive); //$NON-NLS-1$
+        sb.append(':');
+        if (fCriteria != null) {
+            sb.append(" expression=");sb.append(fCriteria.getExpression()); //$NON-NLS-1$
+            sb.append(" active=");sb.append(fIsActive); //$NON-NLS-1$
+            sb.append(" positive=");sb.append(fIsPositive); //$NON-NLS-1$
         } else {
             sb.append("empty criteria"); //$NON-NLS-1$
         }
@@ -134,78 +128,78 @@ public class FilterCriteria {
 
     /**
      * Sets a criteria reference.
-     * @param criteria_ A criteria reference
+     * @param criteria A criteria reference
      */
-    public void setCriteria(Criteria criteria_) {
-        criteria = criteria_;
+    public void setCriteria(Criteria criteria) {
+        fCriteria = criteria;
     }
 
     /**
      * Returns the criteria reference.
-     * 
+     *
      * @return the criteria reference
      */
     public Criteria getCriteria() {
-        return criteria;
+        return fCriteria;
     }
 
     /**
      * Sets the active flag.
-     * 
-     * @param active_ A active value.
+     *
+     * @param isActive A active value.
      */
-    public void setActive(boolean active_) {
-        active = active_;
+    public void setActive(boolean isActive) {
+        fIsActive = isActive;
     }
 
     /**
      * Returns whether filter criteria is active or not.
-     * 
+     *
      * @return whether filter criteria is active or not.
      */
     public boolean isActive() {
-        return active;
+        return fIsActive;
     }
 
     /**
      * Sets filter is for positive filtering or not.
-     * 
-     * @param positive_ The value to set.
+     *
+     * @param isPositive The value to set.
      */
-    public void setPositive(boolean positive_) {
-        positive = positive_;
+    public void setPositive(boolean isPositive) {
+        fIsPositive = isPositive;
     }
 
     /**
      * Returns whether the filter si for positive filtering or not.
-     * 
+     *
      * @return Returns the positive.
      */
     public boolean isPositive() {
-        return positive;
+        return fIsPositive;
     }
 
     /**
      * Sets the loader class name for this filter.
-     * 
-     * @param loaderClassName_ The loader class name to set
+     *
+     * @param loaderClassName The loader class name to set
      */
-    public void setLoaderClassName(String loaderClassName_) {
-        loaderClassName = loaderClassName_;
+    public void setLoaderClassName(String loaderClassName) {
+        fLoaderClassName = loaderClassName;
     }
 
     /**
      * Returns the class loader name.
-     * 
+     *
      * @return the class loader name.
      */
     public String getLoaderClassName() {
-        return loaderClassName;
+        return fLoaderClassName;
     }
 
     /**
      * Finds a filter criteria within a  list of criteria.
-     * 
+     *
      * @param what The filter to find
      * @param list A list of filter criteria
      * @return The found filter criteria or null
@@ -214,7 +208,7 @@ public class FilterCriteria {
         if (what != null && list != null) {
             try {
                 for (Iterator<FilterCriteria> i = list.iterator(); i.hasNext();) {
-                    FilterCriteria fc = (FilterCriteria) i.next();
+                    FilterCriteria fc = i.next();
                     if (what.compareTo(fc)) {
                         return fc;
                     }
@@ -228,7 +222,7 @@ public class FilterCriteria {
 
     /**
      * Compares this filter criteria with a given criteria.
-     * 
+     *
      * @param to The filter criteria to compare.
      * @return usual comparison result (< 0, 0, > 0)
      */
@@ -246,7 +240,7 @@ public class FilterCriteria {
 
     /**
      * Saves current criteria attributes in the dialog settings.
-     *  
+     *
      * @param settings The dialog settings
      */
     public void save(DialogSettings settings) {
@@ -257,23 +251,23 @@ public class FilterCriteria {
         } else {
             settings.put(LOADERCLASSNAME, ""); //$NON-NLS-1$
         }
-        if (criteria != null) {
-            criteria.save(settings);
+        if (fCriteria != null) {
+            fCriteria.save(settings);
         }
     }
 
     /**
      * Loads the criteria with values of the dialog settings.
-     * 
+     *
      * @param settings The dialog settings
      */
     public void load(DialogSettings settings) {
         setActive(settings.getBoolean(ACTIVE));
         setPositive(settings.getBoolean(POSITIVE));
-        String loaderClassName_ = settings.get(LOADERCLASSNAME);
-        setLoaderClassName(loaderClassName_ != null && loaderClassName_.length() > 0 ? loaderClassName_ : null);
-        if (criteria != null) {
-            criteria.load(settings);
+        String loaderClassName = settings.get(LOADERCLASSNAME);
+        setLoaderClassName(loaderClassName != null && loaderClassName.length() > 0 ? loaderClassName : null);
+        if (fCriteria != null) {
+            fCriteria.load(settings);
         }
     }
 }
\ No newline at end of file
This page took 0.028948 seconds and 5 git commands to generate.