helper java_请教问题,helper类在java中的作用。
該樓層疑似違規(guī)已被系統(tǒng)折疊?隱藏此樓查看此樓
public class StatusHelper {
private static List titleKeyCache = new ArrayList();
public static List getAll() {
return titleKeyCache;
}
public static void clear() {
titleKeyCache.clear();
}
public static List initTitleKey(File file) throws Exception {
List tempList = XMLUtil.readTitleKeyXML(file
.getAbsolutePath());
addTitleKeys(tempList);
return tempList;
}
public static void setTitleKey(String createDate, TitleKey[] titleKeys) {
try {
String currentPath = XMLUtil.getTiTleKeyFilePath();
String filePath = currentPath + "/" + createDate + ".xml";
XMLUtil.buildXML(new File(filePath), titleKeys, createDate);
addTitleKeys(Arrays.asList(titleKeys));
} catch (Exception e) {
e.printStackTrace();
}
}
private static void addTitleKeys(List titleKeys) {
for (TitleKey titleKey : titleKeys) {
titleKeyCache.add(titleKey);
}
}
}
總結(jié)
以上是生活随笔為你收集整理的helper java_请教问题,helper类在java中的作用。的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 日期格式化、时间差转换
- 下一篇: 狂神说-Spring学习总结