@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}
		if (obj == null) {
			return false;
		}
		if (getClass() != obj.getClass()) {
			return false;
		}

		// Note: I don't think we can have more than one access at a given address
		DataTypeReference other = (DataTypeReference) obj;
		if (address == null) {
			if (other.address != null) {
				return false;
			}
		}
		else if (!address.equals(other.address)) {
			return false;
		}
		return true;
	}
A preview of how the reference was used
Ghidra/Features/Base/src/main/java/ghidra/app/services/DataTypeReference.java