com.alphasystem.docx4j.builder.wml.TextBuilder 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 com.alphasystem.docx4j.builder.OpenXmlBuilder;
import org.docx4j.wml.Text;
/**
* Fluent API builder for org.docx4j.wml.Text
.
*
*/
public class TextBuilder
extends OpenXmlBuilder
{
/**
* Initialize the underlying object.
*
*/
public TextBuilder() {
this(null);
}
/**
* Initialize the builder with given object.
*
* @param object
* the given object
*/
public TextBuilder(Text 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 TextBuilder(Text src, Text target) {
this(target);
if (src!= null) {
withValue(src.getValue()).withSpace(src.getSpace());
}
}
protected Text createObject() {
return WmlBuilderFactory.OBJECT_FACTORY.createText();
}
public TextBuilder withValue(String value) {
if (value!= null) {
object.setValue(value);
}
return this;
}
public TextBuilder withSpace(String value) {
if (value!= null) {
object.setSpace(value);
}
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy