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

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


package com.alphasystem.docx4j.builder.wml;

import java.math.BigInteger;
import com.alphasystem.docx4j.builder.OpenXmlBuilder;
import org.docx4j.wml.CTColumn;


/**
 * Fluent API builder for org.docx4j.wml.CTColumn.
 * 
 */
public class CTColumnBuilder
    extends OpenXmlBuilder
{


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

    /**
     * Initialize the builder with given object.
     * 
     * @param object
     *     the given object
     */
    public CTColumnBuilder(CTColumn 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 CTColumnBuilder(CTColumn src, CTColumn target) {
        this(target);
        if (src!= null) {
            withW(WmlBuilderFactory.cloneBigInteger(src.getW())).withSpace(WmlBuilderFactory.cloneBigInteger(src.getSpace()));
        }
    }

    protected CTColumn createObject() {
        return WmlBuilderFactory.OBJECT_FACTORY.createCTColumn();
    }

    public CTColumnBuilder withW(BigInteger value) {
        if (value!= null) {
            object.setW(value);
        }
        return this;
    }

    /**
     * Calls setW method.
     * 
     * @param value
     *     Value to set
     * @return
     *     reference to this
     */
    public CTColumnBuilder withW(String value) {
        if (value!= null) {
            object.setW(new BigInteger(value));
        }
        return this;
    }

    /**
     * Calls setW method.
     * 
     * @param value
     *     Value to set
     * @return
     *     reference to this
     */
    public CTColumnBuilder withW(Long value) {
        if (value!= null) {
            object.setW(BigInteger.valueOf(value));
        }
        return this;
    }

    public CTColumnBuilder withSpace(BigInteger value) {
        if (value!= null) {
            object.setSpace(value);
        }
        return this;
    }

    /**
     * Calls setSpace method.
     * 
     * @param value
     *     Value to set
     * @return
     *     reference to this
     */
    public CTColumnBuilder withSpace(String value) {
        if (value!= null) {
            object.setSpace(new BigInteger(value));
        }
        return this;
    }

    /**
     * Calls setSpace method.
     * 
     * @param value
     *     Value to set
     * @return
     *     reference to this
     */
    public CTColumnBuilder withSpace(Long value) {
        if (value!= null) {
            object.setSpace(BigInteger.valueOf(value));
        }
        return this;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy