package com.juliaaano.payload;

import com.juliaaano.payload.provider.Provider;

abstract class SimplePayload<T> implements Payload<T> {

    private final String raw;

    private final T object;

    SimplePayload(final String raw, final Class<T> type) {

        this.raw = raw;
        this.object = provider().deserialize(raw, type);
    }

    SimplePayload(final T object) {

        this.raw = provider().serialize(object);
        this.object = object;
    }

    protected abstract Provider provider();

    @Override
    public String raw() {

        return raw;
    }

    @Override
    public T get() {

        return object;
    }

    @Override
    public String toString() {

        return raw;
    }

    //TODO equals, hashcode
}

@@ -74,16 +74,43 @@
 vider;%0A%0A
+import java.util.Objects;%0A%0A
 abstract
@@ -749,30 +749,320 @@
     
-//TODO equals, hashcode
+@Override%0A    public boolean equals(Object obj) %7B%0A%0A        if (this == obj) return true;%0A        if (!(obj instanceof SimplePayload)) return false;%0A%0A        return Objects.equals(object, ((SimplePayload%3C?%3E) obj).object);%0A    %7D%0A%0A    @Override%0A    public int hashCode() %7B%0A%0A        return Objects.hash(object);%0A    %7D
 %0A%7D%0A

Add equals and hashcode to SimplePayload