public class WriterHelper
extends java.lang.Object
| Modifier and Type | Method | Description |
|---|---|---|
static <B> java.util.List<B> |
copyList(java.util.List<B> originalList) |
Copy one list to new one, returning null if the original is empty or null.
|
static <K,V> java.util.Map<K,V> |
copyMap(java.util.Map<K,V> originalMap) |
Copy one map to new one, returning null if the original is empty or null.
|
static org.w3c.dom.Element |
stringToXML(DocumentTools documentTools,
java.lang.String string) |
|
static <B> void |
writeFile(java.io.File rootFolder,
DocumentFileUtils documentFileUtils,
JsonTools jsonTools,
java.util.Map<java.lang.String,B> beans,
java.lang.String fileName) |
Write map of beans to config folder into rootFolder specified, using specified fileName, in format yaml.
|
public static org.w3c.dom.Element stringToXML(DocumentTools documentTools, java.lang.String string) throws DocumentParseException
DocumentParseExceptionpublic static <B> void writeFile(java.io.File rootFolder,
DocumentFileUtils documentFileUtils,
JsonTools jsonTools,
java.util.Map<java.lang.String,B> beans,
java.lang.String fileName)
B - type of beanrootFolder - root folderdocumentFileUtils - file utilityjsonTools - json utilitybeans - map of beans to be writtenfileName - name of the filepublic static <B> java.util.List<B> copyList(java.util.List<B> originalList)
B - type of beanoriginalList - original list of beanspublic static <K,V> java.util.Map<K,V> copyMap(java.util.Map<K,V> originalMap)
K - type of keyV - type of valueoriginalMap - original map of beans