Simplify anti-entropy code
Change-Id: I6568b1cc7c67e12c5a81ec9f8680f6461813ddce
diff --git a/core/store/dist/src/main/java/org/onosproject/store/impl/Timestamped.java b/core/store/dist/src/main/java/org/onosproject/store/impl/Timestamped.java
index 5b158a0..12dd565 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/impl/Timestamped.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/impl/Timestamped.java
@@ -15,13 +15,12 @@
*/
package org.onosproject.store.impl;
-import static com.google.common.base.Preconditions.checkNotNull;
+import com.google.common.base.MoreObjects;
+import org.onosproject.store.Timestamp;
import java.util.Objects;
-import org.onosproject.store.Timestamp;
-
-import com.google.common.base.MoreObjects;
+import static com.google.common.base.Preconditions.checkNotNull;
/**
* Wrapper class to store Timestamped value.
@@ -69,17 +68,17 @@
* @return true if this instance is newer.
*/
public boolean isNewer(Timestamped<T> other) {
- return isNewer(checkNotNull(other).timestamp());
+ return isNewerThan(checkNotNull(other).timestamp());
}
/**
* Tests if this timestamp is newer than the specified timestamp.
+ *
* @param other timestamp to compare against
* @return true if this instance is newer
*/
- //TODO put this in Timestamp
- public boolean isNewer(Timestamp other) {
- return this.timestamp.compareTo(checkNotNull(other)) > 0;
+ public boolean isNewerThan(Timestamp other) {
+ return timestamp.isNewerThan(other);
}
@Override