1 /*******************************************************************************
2 * Copyright (c) 2015 EfficiOS Inc., Alexandre Montplaisir
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
10 * Alexandre Montplaisir - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.tracecompass
.segmentstore
.core
;
15 import java
.util
.Collection
;
18 * Interface for segment-storing backends.
21 * The type of {@link ISegment} element that will be stored in this
24 * @author Alexandre Montplaisir
26 public interface ISegmentStore
<E
extends ISegment
> extends Collection
<E
> {
29 * Retrieve all elements that inclusively cross the given position.
32 * The target position. This would represent a timestamp, if the
33 * tree's X axis represents time.
34 * @return The intervals that cross this position
36 Iterable
<E
> getIntersectingElements(long position
);
39 * Retrieve all elements that inclusively cross another segment. We define
40 * this target segment by its start and end positions.
42 * This effectively means, all elements that respect *both* conditions:
45 * <li>Their end is after the 'start' parameter</li>
46 * <li>Their start is before the 'end' parameter</li>
50 * The target start position
52 * The target end position
53 * @return The elements overlapping with this segment
55 Iterable
<E
> getIntersectingElements(long start
, long end
);
58 * Dispose the data structure and release any system resources associated
This page took 0.043007 seconds and 5 git commands to generate.