2 * Copyright (c) 2017 Red Hat, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.odlparent.bundlestest.lib;
11 * Value Object for elapsed and remaining time.
13 * @author Michael Vorburger.ch
15 public class TimeInfo {
17 private final long elapsedTimeInMS;
18 private final long remainingTimeInMS;
20 public TimeInfo(long elapsedTimeInMS, long remainingTimeInMS) {
21 this.elapsedTimeInMS = elapsedTimeInMS;
22 this.remainingTimeInMS = remainingTimeInMS;
25 public long getElapsedTimeInMS() {
26 return elapsedTimeInMS;
29 public long getRemainingTimeInMS() {
30 return remainingTimeInMS;
34 public int hashCode() {
37 result = prime * result + (int) (elapsedTimeInMS ^ elapsedTimeInMS >>> 32);
38 result = prime * result + (int) (remainingTimeInMS ^ remainingTimeInMS >>> 32);
43 public boolean equals(Object obj) {
50 if (!(obj instanceof TimeInfo)) {
53 TimeInfo other = (TimeInfo) obj;
54 if (elapsedTimeInMS != other.elapsedTimeInMS) {
57 if (remainingTimeInMS != other.remainingTimeInMS) {
64 public String toString() {
65 return "TimeInfo [elapsedTimeInMS=" + elapsedTimeInMS + ", remainingTimeInMS=" + remainingTimeInMS + "]";