本文整理了Java中com.alibaba.fastjson.JSONArray.subList()
方法的一些代码示例,展示了JSONArray.subList()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JSONArray.subList()
方法的具体详情如下:
包路径:com.alibaba.fastjson.JSONArray
类名称:JSONArray
方法名:subList
暂无
代码示例来源:origin: ltsopensource/light-task-scheduler
@Override
public List<Object> subList(int fromIndex, int toIndex) {
return jsonArray.subList(fromIndex, toIndex);
}
代码示例来源:origin: ltsopensource/light-task-scheduler
@Override
public List<Object> subList(int fromIndex, int toIndex) {
return jsonArray.subList(fromIndex, toIndex);
}
代码示例来源:origin: syhily/elasticsearch-jdbc
@Override
public List<Object> subList(int fromIndex, int toIndex) {
return jsonArray.subList(fromIndex, toIndex);
}
代码示例来源:origin: com.github.ltsopensource/lts-core
@Override
public List<Object> subList(int fromIndex, int toIndex) {
return jsonArray.subList(fromIndex, toIndex);
}
代码示例来源:origin: com.virjar/dungproxy-client
@Override
public Map<String, List<AvProxyVO>> unSerializeProxy() {
Map<String, List<AvProxyVO>> ret = Maps.newHashMap();
if (!new File(trimFileName()).exists()) {
return ret;
}
try {
JSONObject jsonObject = JSONObject
.parseObject(Files.toString(new File(trimFileName()), Charset.defaultCharset()));
if (jsonObject == null) {
logger.warn("本地代理IP池序列化文件损坏");
return ret;
}
for (Map.Entry<String, Object> entry : jsonObject.entrySet()) {
ret.put(entry.getKey(),
Lists.transform(
JSONArray.class.cast(entry.getValue()).subList(0,
JSONArray.class.cast(entry.getValue()).size()),
new Function<Object, AvProxyVO>() {
@Override
public AvProxyVO apply(Object input) {
return JSONObject.toJavaObject(JSONObject.class.cast(input), AvProxyVO.class);
}
}));
}
} catch (Exception e) {
logger.error("error when unSerializeProxy proxy data", e);
}
return ret;
}
代码示例来源:origin: ansitech/weixin4j
if (ipList != null) {
List ips = ipList.subList(0, ipList.size());
return (List<String>) ips;
内容来源于网络,如有侵权,请联系作者删除!