mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-10-23 05:11:04 +02:00
added toString
Change-Id: I5ea98752b3f753eb398c83616afae11305d84e72
This commit is contained in:
parent
b4758a9f58
commit
d2266a70f7
@ -6,6 +6,8 @@ import java.util.Objects;
|
||||
|
||||
import org.onlab.onos.store.Timestamp;
|
||||
|
||||
import com.google.common.base.MoreObjects;
|
||||
|
||||
/**
|
||||
* Wrapper class to store Timestamped value.
|
||||
* @param <T>
|
||||
@ -70,6 +72,14 @@ public final class Timestamped<T> {
|
||||
return Objects.equals(this.timestamp, that.timestamp);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return MoreObjects.toStringHelper(getClass())
|
||||
.add("timestamp", timestamp)
|
||||
.add("value", value)
|
||||
.toString();
|
||||
}
|
||||
|
||||
// Default constructor for serialization
|
||||
@Deprecated
|
||||
protected Timestamped() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user