public Object copyTo(Object target, CopyBuilder copyBuilder) {
    ThoroughfareNumberRange copy =
        (target == null) ? new ThoroughfareNumberRange() : (ThoroughfareNumberRange) target;

    if (isSetAddressLine()) {
      for (AddressLine part : addressLine) {
        AddressLine copyPart = (AddressLine) copyBuilder.copy(part);
        copy.addAddressLine(copyPart);

        if (part != null && copyPart == part) part.setParent(this);
      }
    }

    if (isSetThoroughfareNumberFrom()) {
      copy.setThoroughfareNumberFrom(
          (ThoroughfareNumberFrom) copyBuilder.copy(thoroughfareNumberFrom));
      if (copy.getThoroughfareNumberFrom() == thoroughfareNumberFrom)
        thoroughfareNumberFrom.setParent(this);
    }

    if (isSetThoroughfareNumberTo()) {
      copy.setThoroughfareNumberTo((ThoroughfareNumberTo) copyBuilder.copy(thoroughfareNumberTo));
      if (copy.getThoroughfareNumberTo() == thoroughfareNumberTo)
        thoroughfareNumberTo.setParent(this);
    }

    if (isSetRangeType()) copy.setRangeType(copyBuilder.copy(rangeType));

    if (isSetIndicator()) copy.setIndicator(copyBuilder.copy(indicator));

    if (isSetSeparator()) copy.setSeparator(copyBuilder.copy(separator));

    if (isSetIndicatorOccurrence())
      copy.setIndicatorOccurrence(copyBuilder.copy(indicatorOccurrence));

    if (isSetNumberRangeOccurrence())
      copy.setNumberRangeOccurrence(copyBuilder.copy(numberRangeOccurrence));

    if (isSetType()) copy.setType(copyBuilder.copy(type));

    if (isSetCode()) copy.setCode(copyBuilder.copy(code));

    copy.unsetParent();

    return copy;
  }
  public void unsetThoroughfareNumberFrom() {
    if (isSetThoroughfareNumberFrom()) thoroughfareNumberFrom.unsetParent();

    thoroughfareNumberFrom = null;
  }
  public void setThoroughfareNumberFrom(ThoroughfareNumberFrom thoroughfareNumberFrom) {
    if (thoroughfareNumberFrom != null) thoroughfareNumberFrom.setParent(this);

    this.thoroughfareNumberFrom = thoroughfareNumberFrom;
  }