ctf: Don't include all test traces in jar
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core / src / org / eclipse / linuxtools / tmf / core / interval / TmfStateInterval.java
index e7ab298c0d07cf03c9f426fd09602bf1c7206cb5..1c85d8d771ebe747ee7c9257b369dd92855bd28f 100644 (file)
@@ -1,13 +1,13 @@
 /*******************************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
  * Copyright (c) 2010, 2011 École Polytechnique de Montréal
  * Copyright (c) 2010, 2011 Alexandre Montplaisir <alexandre.montplaisir@gmail.com>
- * 
+ *
  * 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
- * 
+ *
  *******************************************************************************/
 
 package org.eclipse.linuxtools.tmf.core.interval;
@@ -18,11 +18,9 @@ import org.eclipse.linuxtools.tmf.core.statevalue.ITmfStateValue;
  * The StateInterval represents the "state" a particular attribute was in, at a
  * given time. It is the main object being returned from queries to the state
  * system.
- * 
-
- * 
- * @author alexmont
- * 
+ *
+ * @version 1.0
+ * @author Alexandre Montplaisir
  */
 public final class TmfStateInterval implements ITmfStateInterval {
 
@@ -33,11 +31,15 @@ public final class TmfStateInterval implements ITmfStateInterval {
 
     /**
      * Construct an interval from its given parameters
-     * 
+     *
      * @param start
+     *            Start time
      * @param end
+     *            End time
      * @param attribute
+     *            Attribute linked to this interval
      * @param sv
+     *            State value this interval will contain
      */
     public TmfStateInterval(long start, long end, int attribute,
             ITmfStateValue sv) {
@@ -57,6 +59,11 @@ public final class TmfStateInterval implements ITmfStateInterval {
         return end;
     }
 
+    @Override
+    public long getViewerEndTime() {
+        return end + 1;
+    }
+
     @Override
     public int getAttribute() {
         return attribute;
@@ -81,7 +88,7 @@ public final class TmfStateInterval implements ITmfStateInterval {
     public String toString() {
         /* Only used for debugging */
         StringBuffer buf = new StringBuffer(start + " to "); //$NON-NLS-1$
-        buf.append(end + ' ');
+        buf.append(end + ", "); //$NON-NLS-1$
         buf.append(String.format("key = %4d, ", attribute)); //$NON-NLS-1$
         buf.append("value = " + sv.toString()); //$NON-NLS-1$
         return buf.toString();
This page took 0.038434 seconds and 5 git commands to generate.