549ba3d858ec40c612b22d537c54e1d463c459d0
1 /*******************************************************************************
2 * Copyright (c) 2009 Ericsson
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
10 * Francois Chouinard - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.linuxtools
.tmf
.event
;
16 * <b><u>TmfTimeWindow</u></b>
18 * A utility class to define time ranges.
20 public class TmfTimeRange
{
22 // ========================================================================
24 // ========================================================================
26 private final TmfTimestamp fStartTime
;
27 private final TmfTimestamp fEndTime
;
29 // ========================================================================
31 // ========================================================================
37 public TmfTimeRange(TmfTimestamp startTime
, TmfTimestamp endTime
) {
38 fStartTime
= startTime
;
42 // ========================================================================
44 // ========================================================================
47 * @return The time range start time
49 public TmfTimestamp
getStartTime() {
54 * @return The time range end time
56 public TmfTimestamp
getEndTime() {
60 // ========================================================================
62 // ========================================================================
65 * Check if the timestamp is within the time range
70 public boolean contains(TmfTimestamp ts
) {
71 boolean result
= (fStartTime
.compareTo(ts
, true) <= 0) && (fEndTime
.compareTo(ts
, true) >= 0);
This page took 0.032106 seconds and 4 git commands to generate.