org.jxls.util.UtilWrapper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jxls Show documentation
Show all versions of jxls Show documentation
Small library for Excel generation based on XLS templates
package org.jxls.util;
import java.io.IOException;
import java.io.InputStream;
import java.lang.reflect.InvocationTargetException;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import org.jxls.common.CellRef;
import org.jxls.common.Context;
import org.jxls.common.GroupData;
import org.jxls.expression.ExpressionEvaluator;
/**
* A wrapper around {@link Util} class to prevent static methods spreading
*/
public class UtilWrapper {
public List getFormulaCellRefs(String formula) {
return Util.getFormulaCellRefs(formula);
}
public List getJointedCellRefs(String formula) {
return Util.getJointedCellRefs(formula);
}
public List getCellRefsFromJointedCellRef(String jointedCellRef) {
return Util.getCellRefsFromJointedCellRef(jointedCellRef);
}
public boolean formulaContainsJointedCellRef(String formula) {
return Util.formulaContainsJointedCellRef(formula);
}
public String createTargetCellRef(List targetCellDataList) {
return Util.createTargetCellRef(targetCellDataList);
}
public String joinStrings(List strings, String separator) {
return Util.joinStrings(strings, separator);
}
public List> groupByRanges(List cellRefList, int targetRangeCount) {
return Util.groupByRanges(cellRefList, targetRangeCount);
}
public List> groupByColRange(List cellRefList) {
return Util.groupByColRange(cellRefList);
}
public List> groupByRowRange(List cellRefList) {
return groupByRowRange(cellRefList);
}
public Boolean isConditionTrue(ExpressionEvaluator evaluator, String condition, Context context) {
return Util.isConditionTrue(evaluator, condition, context);
}
public Boolean isConditionTrue(ExpressionEvaluator evaluator, Context context) {
return Util.isConditionTrue(evaluator, context);
}
public void setObjectProperty(Object obj, String propertyName, String propertyValue, boolean ignoreNonExisting) {
Util.setObjectProperty(obj, propertyName, propertyValue, ignoreNonExisting);
}
public void setObjectProperty(Object obj, String propertyName, String propertyValue) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
Util.setObjectProperty(obj, propertyName, propertyValue);
}
public Object getObjectProperty(Object obj, String propertyName, boolean failSilently) {
return Util.getObjectProperty(obj, propertyName, failSilently);
}
public Object getObjectProperty(Object obj, String propertyName) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
return Util.getObjectProperty(obj, propertyName);
}
public Collection groupCollection(Collection> collection, String groupProperty, String groupOrder) {
return Util.groupCollection(collection, groupProperty, groupOrder);
}
public Collection groupIterable(Iterable> iterable, String groupProperty, String groupOrder) {
return Util.groupIterable(iterable, groupProperty, groupOrder);
}
public byte[] toByteArray(InputStream stream) throws IOException {
return Util.toByteArray(stream);
}
public Collection> transformToCollectionObject(ExpressionEvaluator expressionEvaluator, String collectionName, Context context) {
return Util.transformToCollectionObject(expressionEvaluator, collectionName, context);
}
public Iterable