com.alphasystem.docx4j.builder.wml.CTPageNumberBuilder 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.CTPageNumber;
import org.docx4j.wml.NumberFormat;
import org.docx4j.wml.STChapterSep;
/**
* Fluent API builder for org.docx4j.wml.CTPageNumber
.
*
*/
public class CTPageNumberBuilder
extends OpenXmlBuilder
{
/**
* Initialize the underlying object.
*
*/
public CTPageNumberBuilder() {
this(null);
}
/**
* Initialize the builder with given object.
*
* @param object
* the given object
*/
public CTPageNumberBuilder(CTPageNumber 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 CTPageNumberBuilder(CTPageNumber src, CTPageNumber target) {
this(target);
if (src!= null) {
withFmt(src.getFmt()).withStart(WmlBuilderFactory.cloneBigInteger(src.getStart())).withChapStyle(WmlBuilderFactory.cloneBigInteger(src.getChapStyle())).withChapSep(src.getChapSep());
}
}
protected CTPageNumber createObject() {
return WmlBuilderFactory.OBJECT_FACTORY.createCTPageNumber();
}
public CTPageNumberBuilder withFmt(NumberFormat value) {
if (value!= null) {
object.setFmt(value);
}
return this;
}
public CTPageNumberBuilder withStart(BigInteger value) {
if (value!= null) {
object.setStart(value);
}
return this;
}
/**
* Calls setStart
method.
*
* @param value
* Value to set
* @return
* reference to this
*/
public CTPageNumberBuilder 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 CTPageNumberBuilder withStart(Long value) {
if (value!= null) {
object.setStart(BigInteger.valueOf(value));
}
return this;
}
public CTPageNumberBuilder withChapStyle(BigInteger value) {
if (value!= null) {
object.setChapStyle(value);
}
return this;
}
/**
* Calls setChapStyle
method.
*
* @param value
* Value to set
* @return
* reference to this
*/
public CTPageNumberBuilder withChapStyle(String value) {
if (value!= null) {
object.setChapStyle(new BigInteger(value));
}
return this;
}
/**
* Calls setChapStyle
method.
*
* @param value
* Value to set
* @return
* reference to this
*/
public CTPageNumberBuilder withChapStyle(Long value) {
if (value!= null) {
object.setChapStyle(BigInteger.valueOf(value));
}
return this;
}
public CTPageNumberBuilder withChapSep(STChapterSep value) {
if (value!= null) {
object.setChapSep(value);
}
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy