com.alphasystem.docx4j.builder.OpenXmlBuilder Maven / Gradle / Ivy
package com.alphasystem.docx4j.builder;
import java.util.Collections;
import java.util.List;
public abstract class OpenXmlBuilder{
protected T object;
protected OpenXmlBuilder() {
this(null);
}
protected OpenXmlBuilder(T object) {
setObject(object);
}
protected abstract T createObject();
public T getObject() {
return object;
}
public void setObject(T object) {
if (object == null) {
object = createObject();
}
this.object = object;
}
@SafeVarargs
protected staticBoolean hasContent(C... content) {
return ((content!= null)&&(content.length > 0));
}
@SafeVarargs
protected staticvoid addContent(List src, C... content) {
if (OpenXmlBuilder.hasContent(content)) {
Collections.addAll(src, content);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy