Fix for Bug375082
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core / src / org / eclipse / linuxtools / tmf / core / interval / ITmfStateInterval.java
CommitLineData
a52fde77
AM
1/*******************************************************************************
2 * Copyright (c) 2012 Ericsson
3 *
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *
9 * Contributors:
10 * Alexandre Montplaisir - Initial API
11 ******************************************************************************/
12
13package org.eclipse.linuxtools.tmf.core.interval;
14
15import org.eclipse.linuxtools.tmf.core.statevalue.ITmfStateValue;
16
17/**
18 * This is the basic interface for accessing state intervals. See
19 * StateInterval.java for a basic implementation.
20 *
21 * A StateInterval is meant to be immutable. All implementing (non-abstract)
22 * classes should ideally be marked as 'final'.
23 *
24 * @author alexmont
25 *
26 */
27public interface ITmfStateInterval {
28
29 /**
30 * Retrieve the start time of the interval
31 *
32 * @return
33 */
34 public long getStartTime();
35
36 /**
37 * Retrieve the end time of the interval
38 *
39 * @return
40 */
41 public long getEndTime();
42
43 /**
44 * Retrieve the quark of the attribute this state interval refers to
45 *
46 * @return
47 */
48 public int getAttribute();
49
50 /**
51 * Retrieve the state value represented by this interval
52 *
53 * @return
54 */
55 public ITmfStateValue getStateValue();
56
57 /**
58 * Test if this interval intersects another timestamp, inclusively.
59 *
60 * @param timestamp
61 * The target timestamp
62 * @return True if the interval and timestamp intersect, false if they don't
63 */
64 public boolean intersects(long timestamp);
65}
This page took 0.043395 seconds and 5 git commands to generate.