/*******************************************************************************
- * 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>
*
import java.util.ArrayList;
import java.util.List;
+import org.eclipse.linuxtools.internal.tmf.core.statesystem.backends.IStateHistoryBackend;
import org.eclipse.linuxtools.tmf.core.exceptions.AttributeNotFoundException;
import org.eclipse.linuxtools.tmf.core.exceptions.StateValueTypeException;
import org.eclipse.linuxtools.tmf.core.exceptions.TimeRangeException;
return latestTime;
}
- ITmfStateValue getOngoingStateValue(int index)
- throws AttributeNotFoundException {
-
+ ITmfStateValue getOngoingStateValue(int index) throws AttributeNotFoundException {
checkValidAttribute(index);
return ongoingStateInfo.get(index);
}
+ long getOngoingStartTime(int index) throws AttributeNotFoundException {
+ checkValidAttribute(index);
+ return ongoingStateStartTimes.get(index);
+ }
+
void changeOngoingStateValue(int index, ITmfStateValue newValue)
throws AttributeNotFoundException {
-
checkValidAttribute(index);
ongoingStateInfo.set(index, newValue);
}
* @param quark
* @throws AttributeNotFoundException
*/
- ITmfStateInterval getOngoingInterval(int quark)
- throws AttributeNotFoundException {
-
+ ITmfStateInterval getOngoingInterval(int quark) throws AttributeNotFoundException {
checkValidAttribute(quark);
return new TmfStateInterval(ongoingStateStartTimes.get(quark), -1, quark,
ongoingStateInfo.get(quark));
}
- private void checkValidAttribute(int quark)
- throws AttributeNotFoundException {
-
+ private void checkValidAttribute(int quark) throws AttributeNotFoundException {
if (quark > ongoingStateInfo.size() - 1 || quark < 0) {
throw new AttributeNotFoundException();
}