Monster merge from the integration branch. Still some problems left and JUnits failing.
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf / src / org / eclipse / linuxtools / tmf / trace / TmfContext.java
index 89ca3239b9cce1044836c5550807e27f048f0e24..042c1ef35feb8019950191b2693fbd278b0370d4 100644 (file)
@@ -35,7 +35,7 @@ public class TmfContext implements ITmfContext, Cloneable {
        }
 
        public TmfContext(ITmfLocation<?> location) {
-               this(location, 0);
+               this(location, UNKNOWN_RANK);
        }
 
        public TmfContext(TmfContext other) {
@@ -43,7 +43,7 @@ public class TmfContext implements ITmfContext, Cloneable {
        }
 
        public TmfContext() {
-               this(null, 0);
+               this(null, UNKNOWN_RANK);
        }
 
        // ------------------------------------------------------------------------
@@ -67,10 +67,14 @@ public class TmfContext implements ITmfContext, Cloneable {
        }
 
        public void updateRank(int delta) {
-               if (fRank != UNKNOWN_RANK)
+               if (isValidRank())
                        fRank += delta;
        }
 
+       public boolean isValidRank() {
+               return fRank != UNKNOWN_RANK;
+       }
+
        // ------------------------------------------------------------------------
        // Object
        // ------------------------------------------------------------------------
This page took 0.025955 seconds and 5 git commands to generate.