Commit | Line | Data |
---|---|---|
032ecd45 | 1 | /******************************************************************************* |
ed902a2b | 2 | * Copyright (c) 2013, 2014 Ericsson |
032ecd45 MAL |
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 | * Marc-Andre Laperle - Initial API and implementation | |
11 | *******************************************************************************/ | |
12 | ||
2bdf0193 | 13 | package org.eclipse.tracecompass.internal.tmf.core.trace.indexer; |
032ecd45 | 14 | |
2bdf0193 | 15 | import org.eclipse.tracecompass.tmf.core.trace.indexer.checkpoint.ITmfCheckpoint; |
032ecd45 MAL |
16 | |
17 | /** | |
18 | * A BTree visitor goes through the tree using a comparator for | |
19 | * optimal searches. | |
20 | * | |
21 | * @author Marc-Andre Laperle | |
22 | */ | |
23 | public interface IBTreeVisitor { | |
24 | ||
25 | /** | |
26 | * The current checkpoint being compared against an internally held key. | |
27 | * | |
28 | * @param checkpoint | |
29 | * the current checkpoint | |
30 | * @return -1 if checkpoint < key, 0 if checkpoint == key, 1 if checkpoint > | |
31 | * key | |
32 | */ | |
33 | int compare(ITmfCheckpoint checkpoint); | |
34 | } |