package de.fabiankeller.palladio.analysis.result;

import de.fabiankeller.palladio.analysis.result.metric.PerformanceMetric;

public class AttachedResult<T> implements Result<T> {

    private final T attachedTo;
    private final PerformanceMetric value;

    public AttachedResult(final T attachedTo1, final PerformanceMetric value) {
        this.attachedTo = attachedTo1;
        this.value = value;
    }

    public T attachedTo() {
        return this.attachedTo;
    }

    @Override
    public PerformanceMetric value() {
        return this.value;
    }
}
@@ -326,24 +326,91 @@
 ic value) %7B%0A
+        assert null != attachedTo1;%0A        assert null != value;%0A%0A
         this
@@ -624,9 +624,678 @@
 ;%0A    %7D%0A
+%0A%0A    @Override%0A    public boolean equals(final Object o) %7B%0A        if (this == o) return true;%0A        if (o == null %7C%7C getClass() != o.getClass()) return false;%0A%0A        final AttachedResult%3C?%3E that = (AttachedResult%3C?%3E) o;%0A%0A        if (!this.attachedTo.equals(that.attachedTo)) return false;%0A        return this.value.equals(that.value);%0A%0A    %7D%0A%0A    @Override%0A    public int hashCode() %7B%0A        int result = this.attachedTo.hashCode();%0A        result = 31 * result + this.value.hashCode();%0A        return result;%0A    %7D%0A%0A    @Override%0A    public String toString() %7B%0A        return String.format(%22Result%5B%25s%5D:%25s%22, this.attachedTo, this.value.toHumanReadable());%0A    %7D%0A
 %7D

define hashCode(), equals() and toString() for AttachedResult