@Override
	public int compareTo(AddressBasedLocation otherLocation) {

		Address otherAddress = otherLocation.address;

		// handle possible presence of null address
		if (address == null) {
			if (otherAddress == null) {
				return 0;
			}
			return -1;
		}
		if (otherAddress == null) {
			return 1;
		}

		AddressSpace mySpace = address.getAddressSpace();
		AddressSpace otherSpace = otherAddress.getAddressSpace();

		// compare on address space name first
		int rc = mySpace.getName().compareTo(otherSpace.getName());
		if (rc != 0) {
			return rc;
		}

		return compareAddressSameSpace(otherLocation);
	}
Compare this location's address with another location's given that they
are both within the same address space.
@param otherLocation other location object
@return comparison value
@see #compareTo(AddressBasedLocation)
Ghidra/Features/Base/src/main/java/ghidra/util/table/field/AddressBasedLocation.java