admin
2025-02-25 30d8e227e8d823b6c38c3b9c90ac2df03b63befe
fanli/src/main/java/com/yeshi/fanli/util/cache/ObjectCacheUtil.java
@@ -1,25 +1,25 @@
package com.yeshi.fanli.util.cache;
import java.util.ArrayList;
import java.util.List;
import com.google.gson.Gson;
import net.sf.json.JSONArray;
public class ObjectCacheUtil<T> {
//   public T getObj( String value) {
//      return new Gson().fromJson(value, Class<T>);
//   }
//
//   public List<T> getObjList(String value) {
//      List<T> list = new ArrayList<>();
//      JSONArray array = JSONArray.fromObject(value);
//      for (int i = 0; i < array.size(); i++) {
//         list.add(new Gson().fromJson(array.optJSONObject(i).toString(), T));
//      }
//      return list;
//   }
}
package com.yeshi.fanli.util.cache;
import java.util.ArrayList;
import java.util.List;
import com.google.gson.Gson;
import net.sf.json.JSONArray;
public class ObjectCacheUtil<T> {
//   public T getObj( String value) {
//      return new Gson().fromJson(value, Class<T>);
//   }
//
//   public List<T> getObjList(String value) {
//      List<T> list = new ArrayList<>();
//      JSONArray array = JSONArray.fromObject(value);
//      for (int i = 0; i < array.size(); i++) {
//         list.add(new Gson().fromJson(array.optJSONObject(i).toString(), T));
//      }
//      return list;
//   }
}