void remove(Object removeObj) {
        if (obj == null) {
            return;
        }
        if (obj.equals(removeObj)) {
            obj = null;
            return;
        }
        if (obj instanceof Object[]) {
            Object[] objArray = (Object[])obj;
            for(int i=0;i<objArray.length;i++) {
                if (objArray[i].equals(removeObj)) {
                    Object[] newArray = new Object[objArray.length-1];
                    int pos = 0;
                    for(int j=0;j<objArray.length;j++) {
                        if (j != i) {
                            newArray[pos++] = objArray[j];
                        }
                    }
                    obj = newArray;
                }
            }
        }

    }
Removes a range from a object.

@param range the range being removed.
@param objID the id of the object it is being
removed from.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/address/AddressObjectMap.java