+ return getReferenceKey().getId() + ':' + getTimeStamp().getTime();
+ }
+
+
+ /**
+ * Check if this key is a newer version than the other key.
+ *
+ * @param otherKey the key to check against
+ * @return true, if this key is newer than the other key
+ */
+ @Override
+ public boolean isNewerThan(@NonNull PfKey otherKey) {
+ Assertions.instanceOf(otherKey, PfReferenceTimestampKey.class);
+ final PfReferenceTimestampKey otherReferenceKey = (PfReferenceTimestampKey) otherKey;
+ if (!getTimeStamp().equals(otherReferenceKey.timeStamp)) {
+ return timeStamp.after(otherReferenceKey.timeStamp);
+ }
+ return getReferenceKey().isNewerThan(otherReferenceKey.getReferenceKey());