我正在读取一个文件,并从我想存储在元组中的某些字段中提取。(vavr 元组)
hashmap 不存储任何元素。我认为我的初始化有问题,我似乎没有弄清楚 Hashmap 是属于的Java.util
,而元组来自vavr
Tuple3<HashMap<String, Integer>, HashMap<String, Integer>, List<Tuple2<String, String>>> tupleResourceActivity = traceRecursion
.apply(f, Tuple.of( new HashMap<String, Integer>(),new HashMap<String, Integer>(),new LinkedList<Tuple2<String, String>>()));
跟踪递归函数:
traceRecursion = (x, t) -> {
if (x.hasNext()) {
Tuple3<HashMap<String, Integer>, HashMap<String, Integer>, List<Tuple2<String, String>>> tx = evtRecursion
.apply(x.next().iterator(), t);
return traceRecursion.apply(x, tx);
} else {
return t;
}
};
我做错了什么?