All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.alphasystem.docx4j.builder.wml.CTSdtContentRowBuilder Maven / Gradle / Ivy


package com.alphasystem.docx4j.builder.wml;

import java.util.List;
import com.alphasystem.docx4j.builder.OpenXmlBuilder;
import org.docx4j.wml.CTSdtContentRow;


/**
 * Fluent API builder for org.docx4j.wml.CTSdtContentRow.
 * 
 */
public class CTSdtContentRowBuilder
    extends OpenXmlBuilder
{


    /**
     * Initialize the underlying object.
     * 
     */
    public CTSdtContentRowBuilder() {
        this(null);
    }

    /**
     * Initialize the builder with given object.
     * 
     * @param object
     *     the given object
     */
    public CTSdtContentRowBuilder(CTSdtContentRow 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 CTSdtContentRowBuilder(CTSdtContentRow src, CTSdtContentRow target) {
        this(target);
        if (src!= null) {
            List content = src.getContent();
            for (Object o: content) {
                addContent(WmlBuilderFactory.cloneObject(o));
            }
        }
    }

    protected CTSdtContentRow createObject() {
        return WmlBuilderFactory.OBJECT_FACTORY.createCTSdtContentRow();
    }

    public CTSdtContentRowBuilder addContent(Object... value) {
        addContent(object.getContent(), value);
        return this;
    }

}