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
.internal
.tmf
.core
.synchronization
;
15 import org
.eclipse
.jdt
.annotation
.NonNull
;
16 import org
.eclipse
.tracecompass
.tmf
.core
.synchronization
.ITmfTimestampTransform
;
17 import org
.eclipse
.tracecompass
.tmf
.core
.timestamp
.ITmfTimestamp
;
20 * A default simple, identity timestamp transform. It is a singleton class and
21 * returns the timestamp itself
23 * @author Geneviève Bastien
25 public final class TmfTimestampTransform
implements ITmfTimestampTransformInvertible
{
28 * Generated serial UID
30 private static final long serialVersionUID
= -1480581417493073304L;
33 * The unique instance of this transform, since it is always the same
35 public static final @NonNull TmfTimestampTransform IDENTITY
= new TmfTimestampTransform();
40 private TmfTimestampTransform() {
45 public ITmfTimestamp
transform(ITmfTimestamp timestamp
) {
50 public long transform(long timestamp
) {
55 public ITmfTimestampTransform
composeWith(ITmfTimestampTransform composeWith
) {
56 /* Since this transform will not modify anything, return the other */
61 public String
toString() {
62 return "TmfTimestampTransform [ IDENTITY ]"; //$NON-NLS-1$
66 public ITmfTimestampTransform
inverse() {