1 /*******************************************************************************
2 * Copyright (c) 2012 Ericsson
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
9 * Contributors: Matthew Khouzam - Initial API and implementation
10 *******************************************************************************/
12 package org
.eclipse
.linuxtools
.tmf
.core
.ctfadaptor
;
14 import org
.eclipse
.linuxtools
.tmf
.core
.event
.ITmfTimestamp
;
15 import org
.eclipse
.linuxtools
.tmf
.core
.event
.TmfTimestamp
;
18 * The CTF adapter for the TMF timestamp
21 * @author Matthew khouzam
23 public class CtfTmfTimestamp
extends TmfTimestamp
{
27 public enum TimestampType
{
29 * yyyy/mm/dd hh:mm:ss.nnnnnnnnnn
37 * nnnnnnnnnnnnnnnnnnnnn ns
41 * ssssssssss.nnnnnnnnnn s
46 private TimestampType type
;
49 * Constructor for CtfTmfTimestamp.
50 * @param timestamp long
52 public CtfTmfTimestamp(long timestamp
) {
53 setValue(timestamp
, ITmfTimestamp
.NANOSECOND_SCALE
, 0);
54 type
= TimestampType
.DAY
;
59 * @param value TimestampType
61 public void setType(TimestampType value
) {
67 * @return TimestampType
69 public TimestampType
getType() {
74 * @see java.lang.Object#hashCode()
77 public int hashCode() {
79 int result
= super.hashCode() * prime
;
80 result
+= ((type
== null) ?
0 : type
.toString().hashCode());
85 * @see java.lang.Object#equals(java.lang.Object)
88 public boolean equals(Object obj
) {
92 if (!super.equals(obj
)) {
95 if (!(obj
instanceof CtfTmfTimestamp
)) {
98 CtfTmfTimestamp other
= (CtfTmfTimestamp
) obj
;
99 if (type
!= other
.type
) {
This page took 0.043956 seconds and 5 git commands to generate.