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

com.alphasystem.docx4j.builder.wml.CTTabStopBuilder 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.CTTabStop;
import org.docx4j.wml.STTabJc;
import org.docx4j.wml.STTabTlc;


/**
 * Fluent API builder for org.docx4j.wml.CTTabStop.
 * 
 */
public class CTTabStopBuilder
    extends OpenXmlBuilder
{


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

    /**
     * Initialize the builder with given object.
     * 
     * @param object
     *     the given object
     */
    public CTTabStopBuilder(CTTabStop 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 CTTabStopBuilder(CTTabStop src, CTTabStop target) {
        this(target);
        if (src!= null) {
            withVal(src.getVal()).withLeader(src.getLeader()).withPos(WmlBuilderFactory.cloneBigInteger(src.getPos()));
        }
    }

    protected CTTabStop createObject() {
        return WmlBuilderFactory.OBJECT_FACTORY.createCTTabStop();
    }

    public CTTabStopBuilder withVal(STTabJc value) {
        if (value!= null) {
            object.setVal(value);
        }
        return this;
    }

    public CTTabStopBuilder withLeader(STTabTlc value) {
        if (value!= null) {
            object.setLeader(value);
        }
        return this;
    }

    public CTTabStopBuilder withPos(BigInteger value) {
        if (value!= null) {
            object.setPos(value);
        }
        return this;
    }

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

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

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy