Commit | Line | Data |
---|---|---|
26a6a7eb AM |
1 | /******************************************************************************* |
2 | * Copyright (c) 2015 EfficiOS Inc., Alexandre Montplaisir | |
3 | * | |
4 | * All rights reserved. This program and the accompanying materials | |
5 | * are made available under the terms of the Eclipse Public License v1.0 | |
6 | * which accompanies this distribution, and is available at | |
7 | * http://www.eclipse.org/legal/epl-v10.html | |
8 | * | |
9 | * Contributors: | |
10 | * Alexandre Montplaisir - Initial API and implementation | |
11 | *******************************************************************************/ | |
12 | ||
13 | package org.eclipse.tracecompass.segmentstore.core; | |
14 | ||
15 | import java.io.Serializable; | |
16 | ||
17 | /** | |
18 | * Generic interface for any segment (like a time range) that can be used in the | |
19 | * segment store. | |
20 | * | |
21 | * @author Alexandre Montplaisir | |
22 | */ | |
e5083481 | 23 | public interface ISegment extends Serializable, Comparable<ISegment> { |
26a6a7eb AM |
24 | |
25 | /** | |
26 | * The start position/time of the segment. | |
27 | * | |
28 | * @return The start position | |
29 | */ | |
30 | long getStart(); | |
31 | ||
32 | /** | |
33 | * The end position/time of the segment | |
34 | * | |
35 | * @return The end position | |
36 | */ | |
37 | long getEnd(); | |
38 | ||
39 | /** | |
40 | * The length/duration of the segment. Normally ({@link #getEnd()} - | |
41 | * {@link #getStart()}). | |
42 | * | |
43 | * @return The duration | |
44 | */ | |
45 | long getLength(); | |
46 | } |