@Override
	public void delete(Set<Integer> ordinals) {

		if (ordinals.isEmpty()) {
			return;
		}

		if (ordinals.size() == 1) {
			ordinals.forEach(ordinal -> delete(ordinal));
			return;
		}

		int oldAlignment = getAlignment();

		List<DataTypeComponentImpl> newComponents = new ArrayList<>();
		int newLength = 0;
		int ordinalAdjustment = 0;
		for (DataTypeComponentImpl dtc : components) {
			int ordinal = dtc.getOrdinal();
			if (ordinals.contains(ordinal)) {
				// component removed
				--ordinalAdjustment;
			}
			else {
				if (ordinalAdjustment != 0) {
					dtc.setOrdinal(dtc.getOrdinal() + ordinalAdjustment);
				}
				newComponents.add(dtc);
				newLength = Math.max(newLength, dtc.getLength());
			}
		}
		components = newComponents;

		if (isPackingEnabled()) {
			if (!repack(true) && oldAlignment != getAlignment()) {
				notifyAlignmentChanged();
			}
		}
		else if (unionLength != newLength) {
			unionLength = newLength;
			notifySizeChanged();
		}
	}
Construct a new UnionDataType.
NOTE: A constructor form which accepts a {@link DataTypeManager} should be used when possible
since there may be performance benefits during datatype resolution.
@param name the name of this dataType
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/UnionDataType.java