com.alphasystem.docx4j.builder.wml.CTLineNumberBuilder 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 java.math.BigInteger;
import com.alphasystem.docx4j.builder.OpenXmlBuilder;
import org.docx4j.wml.CTLineNumber;
import org.docx4j.wml.STLineNumberRestart;
/**
* Fluent API builder for org.docx4j.wml.CTLineNumber
.
*
*/
public class CTLineNumberBuilder
extends OpenXmlBuilder
{
/**
* Initialize the underlying object.
*
*/
public CTLineNumberBuilder() {
this(null);
}
/**
* Initialize the builder with given object.
*
* @param object
* the given object
*/
public CTLineNumberBuilder(CTLineNumber 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 CTLineNumberBuilder(CTLineNumber src, CTLineNumber target) {
this(target);
if (src!= null) {
withCountBy(WmlBuilderFactory.cloneBigInteger(src.getCountBy())).withStart(WmlBuilderFactory.cloneBigInteger(src.getStart())).withDistance(WmlBuilderFactory.cloneBigInteger(src.getDistance())).withRestart(src.getRestart());
}
}
protected CTLineNumber createObject() {
return WmlBuilderFactory.OBJECT_FACTORY.createCTLineNumber();
}
public CTLineNumberBuilder withCountBy(BigInteger value) {
if (value!= null) {
object.setCountBy(value);
}
return this;
}
/**
* Calls setCountBy
method.
*
* @param value
* Value to set
* @return
* reference to this
*/
public CTLineNumberBuilder withCountBy(String value) {
if (value!= null) {
object.setCountBy(new BigInteger(value));
}
return this;
}
/**
* Calls setCountBy
method.
*
* @param value
* Value to set
* @return
* reference to this
*/
public CTLineNumberBuilder withCountBy(Long value) {
if (value!= null) {
object.setCountBy(BigInteger.valueOf(value));
}
return this;
}
public CTLineNumberBuilder withStart(BigInteger value) {
if (value!= null) {
object.setStart(value);
}
return this;
}
/**
* Calls setStart
method.
*
* @param value
* Value to set
* @return
* reference to this
*/
public CTLineNumberBuilder withStart(String value) {
if (value!= null) {
object.setStart(new BigInteger(value));
}
return this;
}
/**
* Calls setStart
method.
*
* @param value
* Value to set
* @return
* reference to this
*/
public CTLineNumberBuilder withStart(Long value) {
if (value!= null) {
object.setStart(BigInteger.valueOf(value));
}
return this;
}
public CTLineNumberBuilder withDistance(BigInteger value) {
if (value!= null) {
object.setDistance(value);
}
return this;
}
/**
* Calls setDistance
method.
*
* @param value
* Value to set
* @return
* reference to this
*/
public CTLineNumberBuilder withDistance(String value) {
if (value!= null) {
object.setDistance(new BigInteger(value));
}
return this;
}
/**
* Calls setDistance
method.
*
* @param value
* Value to set
* @return
* reference to this
*/
public CTLineNumberBuilder withDistance(Long value) {
if (value!= null) {
object.setDistance(BigInteger.valueOf(value));
}
return this;
}
public CTLineNumberBuilder withRestart(STLineNumberRestart value) {
if (value!= null) {
object.setRestart(value);
}
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy