package org.metaborg.util;

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

/**
 * Pointer pointer in Java.
 */
public class Ref<T> implements Serializable {
    private static final long serialVersionUID = 1L;

    private T value;


    public Ref() {
        this(null);
    }

    public Ref(T value) {
        this.value = value;
    }


    public T get() {
        return value;
    }

    public void set(T value) {
        this.value = value;
    }

    @Override public String toString() {
        return "&" + Objects.toString(value);
    }

}

@@ -554,10 +554,904 @@
 %0A    %7D%0A%0A
+    /* (non-Javadoc)%0A     * @see java.lang.Object#hashCode()%0A     */%0A    @Override%0A    public int hashCode() %7B%0A        final int prime = 31;%0A        int result = 1;%0A        result = prime * result + ((value == null) ? 0 : value.hashCode());%0A        return result;%0A    %7D%0A%0A    /* (non-Javadoc)%0A     * @see java.lang.Object#equals(java.lang.Object)%0A     */%0A    @Override%0A    public boolean equals(Object obj) %7B%0A        if(this == obj) %7B%0A            return true;%0A        %7D%0A        if(obj == null) %7B%0A            return false;%0A        %7D%0A        if(!(obj instanceof Ref)) %7B%0A            return false;%0A        %7D%0A        @SuppressWarnings(%22rawtypes%22)%0A        Ref other = (Ref) obj;%0A        if(value == null) %7B%0A            if(other.value != null) %7B%0A                return false;%0A            %7D%0A        %7D else if(!value.equals(other.value)) %7B%0A            return false;%0A        %7D%0A        return true;%0A    %7D%0A%0A
 %7D%0A

Add equals/hashcode to Ref util class