tmf: Move plugins to their own sub-directory
[deliverable/tracecompass.git] / tmf / org.eclipse.tracecompass.tmf.core / src / org / eclipse / tracecompass / tmf / core / synchronization / ITmfTimestampTransform.java
1 /*******************************************************************************
2 * Copyright (c) 2013, 2014 École Polytechnique de Montréal
3 *
4 * All rights reserved. This program and the accompanying materials are made
5 * 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 * Geneviève Bastien - Initial implementation and API
11 *******************************************************************************/
12
13 package org.eclipse.tracecompass.tmf.core.synchronization;
14
15 import java.io.Serializable;
16
17 import org.eclipse.jdt.annotation.NonNull;
18 import org.eclipse.tracecompass.tmf.core.timestamp.ITmfTimestamp;
19
20 /**
21 * This class contains a formula to transform the value of a timestamp, for
22 * example after trace synchronization
23 *
24 * @author Geneviève Bastien
25 */
26 public interface ITmfTimestampTransform extends Serializable {
27
28 /**
29 * Transforms a timestamp
30 *
31 * @param timestamp
32 * The timestamp to transform
33 * @return the transformed timestamp
34 */
35 @NonNull ITmfTimestamp transform(@NonNull ITmfTimestamp timestamp);
36
37 /**
38 * Transforms a timestamp value
39 *
40 * @param timestamp
41 * The timestamp to transform in nanoseconds
42 * @return the transformed value
43 */
44 long transform(long timestamp);
45
46 /**
47 * Returns a timestamp transform that is the composition of two timestamp
48 * transforms. Composed objects must be the same type.
49 *
50 * @param composeWith
51 * The transform to first apply on the timestamp before applying
52 * the current object
53 * @return A new timestamp transform object with the resulting composition.
54 *
55 * TODO: allow composition of different transform types.
56 */
57 ITmfTimestampTransform composeWith(ITmfTimestampTransform composeWith);
58
59 }
This page took 0.032364 seconds and 5 git commands to generate.