public static void encodeContextData(Encoder encoder, List<ContextSetting> ctxList)
			throws IOException {
		if (ctxList.isEmpty()) {
			return;
		}
		encoder.openElement(ELEM_CONTEXT_DATA);
		Iterator<ContextSetting> iter = ctxList.iterator();
		ContextSetting startContext = iter.next();
		boolean isContextReg = startContext.register.isProcessorContext();
		Address firstAddr = startContext.startAddr;
		Address lastAddr = startContext.endAddr;
		while (iter.hasNext()) {
			encoder.openElement(
				isContextReg ? ELEM_CONTEXT_SET : ELEM_TRACKED_SET);
			AddressXML.encodeAttributes(encoder, firstAddr, lastAddr);
			startContext.encode(encoder);
			while (iter.hasNext()) {
				startContext = iter.next();
				boolean nextIsContext = startContext.register.isProcessorContext();
				boolean shouldBreak = false;
				if (isContextReg != nextIsContext) {
					isContextReg = nextIsContext;
					shouldBreak = true;
				}
				if (!firstAddr.equals(startContext.startAddr)) {
					firstAddr = startContext.startAddr;
					shouldBreak = true;
				}
				if (!lastAddr.equals(startContext.endAddr)) {
					lastAddr = startContext.endAddr;
					shouldBreak = true;
				}
				if (shouldBreak) {
					break;
				}
				startContext.encode(encoder);
			}
			encoder.closeElement(
				isContextReg ? ELEM_CONTEXT_SET : ELEM_TRACKED_SET);
		}
		encoder.closeElement(ELEM_CONTEXT_DATA);
	}
Determine if this ContextSetting is equivalent to another specified instance
@param obj is the other instance
@return true if they are equivalent
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/lang/ContextSetting.java