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

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

There is a newer version: 0.5.5
Show newest version

package com.alphasystem.docx4j.builder.wml;

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


/**
 * Fluent API builder for org.docx4j.wml.TblWidth.
 * 
 */
public class TblWidthBuilder
    extends OpenXmlBuilder
{


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

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

    protected TblWidth createObject() {
        return WmlBuilderFactory.OBJECT_FACTORY.createTblWidth();
    }

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

    /**
     * Calls setW method.
     * 
     * @param value
     *     Value to set
     * @return
     *     reference to this
     */
    public TblWidthBuilder 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 TblWidthBuilder withW(Long value) {
        if (value!= null) {
            object.setW(BigInteger.valueOf(value));
        }
        return this;
    }

    public TblWidthBuilder withType(String value) {
        if (value!= null) {
            object.setType(value);
        }
        return this;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy