com.alphasystem.docx4j.builder.wml.TrPrBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of open-xml-builder Show documentation
Show all versions of open-xml-builder Show documentation
Alpha system commons library
package com.alphasystem.docx4j.builder.wml;
import com.alphasystem.docx4j.builder.OpenXmlBuilder;
import org.docx4j.wml.CTTrPrChange;
import org.docx4j.wml.CTTrackChange;
import org.docx4j.wml.TrPr;
/**
* Fluent API builder for org.docx4j.wml.TrPr
.
*
*/
public class TrPrBuilder
extends OpenXmlBuilder
{
/**
* Initialize the underlying object.
*
*/
public TrPrBuilder() {
this(null);
}
/**
* Initialize the builder with given object.
*
* @param object
* the given object
*/
public TrPrBuilder(TrPr object) {
super(object);
}
/**
* Copies values fom src
into target
. Values of target
will be overridden by the values from src
.
*
* @param src
* source object
* @param target
* target object
*/
public TrPrBuilder(TrPr src, TrPr target) {
this(target);
if (src!= null) {
CTTrackChange ins = src.getIns();
if (ins!= null) {
ins = new com.alphasystem.docx4j.builder.wml.CTTrackChangeBuilder(ins, object.getIns()).getObject();
}
CTTrackChange del = src.getDel();
if (del!= null) {
del = new com.alphasystem.docx4j.builder.wml.CTTrackChangeBuilder(del, object.getDel()).getObject();
}
CTTrPrChange trPrChange = src.getTrPrChange();
if (trPrChange!= null) {
trPrChange = new CTTrPrChangeBuilder(trPrChange, object.getTrPrChange()).getObject();
}
withIns(ins).withDel(del).withTrPrChange(trPrChange);
}
}
protected TrPr createObject() {
return WmlBuilderFactory.OBJECT_FACTORY.createTrPr();
}
public TrPrBuilder withIns(CTTrackChange value) {
if (value!= null) {
object.setIns(value);
}
return this;
}
public TrPrBuilder withDel(CTTrackChange value) {
if (value!= null) {
object.setDel(value);
}
return this;
}
public TrPrBuilder withTrPrChange(CTTrPrChange value) {
if (value!= null) {
object.setTrPrChange(value);
}
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy