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
;
16 * Interface for segment-storing backends.
19 * The type of {@link ISegment} element that will be stored in this
22 * @author Alexandre Montplaisir
24 public interface ISegmentStore
<T
extends ISegment
> extends Iterable
<T
> {
27 * Add an element to the database.
29 * @param elem The element to add.
31 void addElement(T elem
);
34 * Get the number of element currently existing in the database.
36 * @return The number of elements.
41 * Retrieve all elements that inclusively cross the given position.
44 * The target position. This would represent a timestamp, if the
45 * tree's X axis represents time.
46 * @return The intervals that cross this position
48 Iterable
<T
> getIntersectingElements(long position
);
51 * Retrieve all elements that inclusively cross another segment. We define
52 * this target segment by its start and end positions.
54 * This effectively means, all elements that respect *both* conditions:
57 * <li>Their end is after the 'start' parameter</li>
58 * <li>Their start is before the 'end' parameter</li>
62 * The target start position
64 * The target end position
65 * @return The elements overlapping with this segment
67 Iterable
<T
> getIntersectingElements(long start
, long end
);
70 * Dispose the data structure and release any system resources associated
This page took 0.039386 seconds and 5 git commands to generate.