tmf: API clean-up of sequence diagram framework
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ui / src / org / eclipse / linuxtools / tmf / ui / views / uml2sd / dialogs / FilterCriteria.java
index e95a88aa3cd90754c94a9c534217780536c37983..d67a88e4a96d1a305804d3ecec63a182b0dabc6c 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,30 +46,30 @@ public class FilterCriteria {
     // Attributes
     // ------------------------------------------------------------------------
     /**
-     * The criteria reference.  
+     * The criteria reference.
      */
-    protected Criteria fCriteria;
+    private Criteria fCriteria;
     /**
      * Flag whether this criteria is active or not
      */
-    protected boolean fIsActive;
+    private boolean fIsActive;
     /**
      * Flag whether this criteria is for positive filter or not
      */
-    protected boolean fIsPositive;
+    private boolean fIsPositive;
     /**
      * The loader class name.
      */
-    protected String fLoaderClassName;
+    private String fLoaderClassName;
 
     // ------------------------------------------------------------------------
     // Constructor
     // ------------------------------------------------------------------------
     /**
      * Standard constructor
-     * 
+     *
      * @param criteria A criteria reference
-     * @param isActive <code>true</code> if filter criteria is active else <code>false</code> 
+     * @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 isActive, boolean isPositive) {
@@ -79,9 +78,9 @@ public class FilterCriteria {
 
     /**
      * Constructor
-     * 
+     *
      * @param criteria A criteria reference
-     * @param isActive <code>true</code> if filter criteria is active else <code>false</code> 
+     * @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
      */
@@ -112,10 +111,7 @@ public class FilterCriteria {
     // ------------------------------------------------------------------------
     // Methods
     // ------------------------------------------------------------------------
-    /*
-     * (non-Javadoc)
-     * @see java.lang.Object#toString()
-     */
+
     @Override
     public String toString() {
         StringBuffer sb = new StringBuffer(super.toString());
@@ -140,7 +136,7 @@ public class FilterCriteria {
 
     /**
      * Returns the criteria reference.
-     * 
+     *
      * @return the criteria reference
      */
     public Criteria getCriteria() {
@@ -149,7 +145,7 @@ public class FilterCriteria {
 
     /**
      * Sets the active flag.
-     * 
+     *
      * @param isActive A active value.
      */
     public void setActive(boolean isActive) {
@@ -158,7 +154,7 @@ public class FilterCriteria {
 
     /**
      * Returns whether filter criteria is active or not.
-     * 
+     *
      * @return whether filter criteria is active or not.
      */
     public boolean isActive() {
@@ -167,7 +163,7 @@ public class FilterCriteria {
 
     /**
      * Sets filter is for positive filtering or not.
-     * 
+     *
      * @param isPositive The value to set.
      */
     public void setPositive(boolean isPositive) {
@@ -176,7 +172,7 @@ public class FilterCriteria {
 
     /**
      * Returns whether the filter si for positive filtering or not.
-     * 
+     *
      * @return Returns the positive.
      */
     public boolean isPositive() {
@@ -185,7 +181,7 @@ public class FilterCriteria {
 
     /**
      * Sets the loader class name for this filter.
-     * 
+     *
      * @param loaderClassName The loader class name to set
      */
     public void setLoaderClassName(String loaderClassName) {
@@ -194,7 +190,7 @@ public class FilterCriteria {
 
     /**
      * Returns the class loader name.
-     * 
+     *
      * @return the class loader name.
      */
     public String getLoaderClassName() {
@@ -203,7 +199,7 @@ public class FilterCriteria {
 
     /**
      * 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
@@ -212,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;
                     }
@@ -226,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)
      */
@@ -244,7 +240,7 @@ public class FilterCriteria {
 
     /**
      * Saves current criteria attributes in the dialog settings.
-     *  
+     *
      * @param settings The dialog settings
      */
     public void save(DialogSettings settings) {
@@ -262,7 +258,7 @@ public class FilterCriteria {
 
     /**
      * Loads the criteria with values of the dialog settings.
-     * 
+     *
      * @param settings The dialog settings
      */
     public void load(DialogSettings settings) {
This page took 0.029997 seconds and 5 git commands to generate.