1 /*******************************************************************************
2 * Copyright (c) 2013, 2014 École Polytechnique de Montréal
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
10 * Geneviève Bastien - Initial implementation and API
11 *******************************************************************************/
13 package org
.eclipse
.tracecompass
.tmf
.core
.synchronization
;
15 import java
.io
.Serializable
;
17 import org
.eclipse
.jdt
.annotation
.NonNull
;
18 import org
.eclipse
.tracecompass
.tmf
.core
.timestamp
.ITmfTimestamp
;
21 * This class contains a formula to transform the value of a timestamp, for
22 * example after trace synchronization
24 * @author Geneviève Bastien
26 public interface ITmfTimestampTransform
extends Serializable
{
29 * Transforms a timestamp
32 * The timestamp to transform
33 * @return the transformed timestamp
35 @NonNull ITmfTimestamp
transform(@NonNull ITmfTimestamp timestamp
);
38 * Transforms a timestamp value
41 * The timestamp to transform in nanoseconds
42 * @return the transformed value
44 long transform(long timestamp
);
47 * Returns a timestamp transform that is the composition of two timestamp
48 * transforms. Composed objects must be the same type.
51 * The transform to first apply on the timestamp before applying
53 * @return A new timestamp transform object with the resulting composition.
55 * TODO: allow composition of different transform types.
57 ITmfTimestampTransform
composeWith(ITmfTimestampTransform composeWith
);