/*******************************************************************************
- * 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;
* 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 {
/**
* 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) {
return end;
}
+ @Override
+ public long getViewerEndTime() {
+ return end + 1;
+ }
+
@Override
public int getAttribute() {
return attribute;
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();