@Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (obj == this) {
            return true;
        }
        if (!(obj instanceof Reference)) {
            return false;
        }
        Reference ref = (Reference)obj;
        return isMemoryReference() &&
				fromAddr.equals(ref.getFromAddress()) &&
	            toAddr.equals(ref.getToAddress()) &&
	            opIndex == ref.getOperandIndex() &&
				symbolID == ref.getSymbolID() &&
				isPrimary == ref.isPrimary() &&
				sourceType == ref.getSource() &&
				refType == ref.getReferenceType() &&
				isShiftedReference() == ref.isShiftedReference() &&
				isOffsetReference() == ref.isOffsetReference();
    }
@see java.lang.Object#equals(Object)
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/symbol/MemReferenceImpl.java