package com.bt.openlink.type;

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

import javax.annotation.Nonnull;

public abstract class AbstractType<T extends Serializable> implements Serializable {
    private static final long serialVersionUID = -9151712856005085627L;
    @Nonnull private final T value;

    protected AbstractType(@Nonnull final T value) {
        this.value = value;
    }

    @Nonnull
    public T value() {
        return value;
    }

    @Nonnull
    @Override
    public String toString() {
        return String.valueOf(value);
    }

    @Override
    public boolean equals(final Object o) {
        if (this == o) {
            return true;
        }

        if (o == null || this.getClass() != o.getClass()) {
            return false;
        }

        final AbstractType that = (AbstractType) o;
        return Objects.equals(this.value, that.value);
    }

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

}

@@ -171,16 +171,32 @@
 alizable
+ & Comparable%3CT%3E
 %3E implem
@@ -212,16 +212,45 @@
 alizable
+, Comparable%3CAbstractType%3CT%3E%3E
  %7B%0A    p
@@ -298,27 +298,27 @@
  = -
-9
 15
-1712856005085
+230684558634750
 62
-7
 L;%0A 
@@ -1028,10 +1028,143 @@
 %0A    %7D%0A%0A
+    @Override%0A    public int compareTo(@Nonnull final AbstractType%3CT%3E that) %7B%0A        return this.value.compareTo(that.value);%0A    %7D%0A
 %7D%0A

Make AbstractType Comparable as well as Serializable