synchronized public void setFilter(int type, int filter) {
		// Validate the filter.
		if (!validateType(type)) {
			Msg.error(this, "setFilter: Invalid type.");
			return;
		}
		if (!validateFilter(filter)) {
			Msg.error(this, "setFilter: Invalid filter.");
			return;
		}

		int[] types = getPrimaryTypes();
		for (int i = 0; i < types.length; i++) {
			if ((type & (types[i])) != 0) {
				int tmpFilter = filter;
				if ((filter == MERGE) && (!isMergeValidForFilter(types[i]))) {
					tmpFilter = REPLACE; // Set filter to REPLACE, since MERGE is invalid.
				}
				filterFlags[i] = tmpFilter;
			}
		}
	}
setFilter specifies whether or not the indicated type of item will
not be included by the filter (IGNORE), replaced in the first program using the type of 
item in the second program (REPLACE), or included from both programs (MERGE).
Valid types are: BYTES, INSTRUCTIONS, DATA, REFERENCES,
SYMBOLS, PRIMARY_SYMBOL, COMMENTS, PROPERTIES, BOOKMARKS, FUNCTIONS, ALL, or combinations of
these "OR"ed together.
if <CODE>MERGE</CODE> is not valid for an included primary type, then it 
will be set to <CODE>REPLACE</CODE> instead for that primary type.

@param type the type(s) of difference(s) to include.
@param filter IGNORE, REPLACE, or MERGE. Indicates whether to include none, 
one, or both programs' differences of the specified type.
Ghidra/Features/Base/src/main/java/ghidra/program/util/ProgramMergeFilter.java