package rx.broadcast;

import java.io.Serializable;
import java.util.Objects;

final class Timestamped<T> implements Comparable<Timestamped<T>>, Serializable {
    private static final long serialVersionUID = 114L;

    @SuppressWarnings("WeakerAccess")
    public long timestamp;

    public T value;

    @SuppressWarnings("unused")
    Timestamped() {

    }

    Timestamped(final long timestamp, final T value) {
        this.timestamp = timestamp;
        this.value = value;
    }

    @Override
    public int compareTo(final Timestamped<T> other) {
        return Long.compareUnsigned(timestamp, other.timestamp);
    }

    @Override
    public String toString() {
        return String.format("Timestamped{timestamp=%d, value=%s}", timestamp, value);
    }

    @Override
    public boolean equals(final Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        final Timestamped<?> timestamped = (Timestamped<?>) o;
        return timestamp == timestamped.timestamp && Objects.equals(value, timestamped.value);
    }

    @Override
    public int hashCode() {
        return Objects.hash(timestamp, value);
    }
}

@@ -16,16 +16,59 @@
 dcast;%0A%0A
+import org.jetbrains.annotations.NotNull;%0A%0A
 import j
@@ -564,16 +564,25 @@
 mpareTo(
+@NotNull 
 final Ti

Annotate Timestamped#compareTo parameter as NotNull